SAPPHIRE_VERSION_SETTING="^[[:space:]]*export[[:space:]]+SAPPHIRE_CURRENT_VERSION="
SAPPHIRE_VERSION_SETTING_VALUE=`egrep "${SAPPHIRE_VERSION_SETTING}" ~/${QUERY_STRING}/config/sapphire_env.sh | sed s/"${SAPPHIRE_VERSION_SETTING}"//`
# Define the regex which will account for spaces at
# the start of the line
TOOL_VERSION_EXP="^[[:space:]]*export[[:space:]]+APP_VERSION=" 

# Search for the regex, grabbing the value after the equals,
# then stripping the name of the setting
TOOL_VERSION_VALUE=`egrep "${TOOL_VERSION_EXP}" settings.config |
  sed -r s/"${TOOL_VERSION_EXP}"//`