import re


def getMessageError(response):
    """
     Extracts the error message from an ERDDAP error output.
    """
    emessageSearch = re.search(r'message="(.*)"', response)
    if emessageSearch:
        return emessageSearch.group(1)
    else:
        return ""