@staticmethod
def extract_intent_and_entities(user_input):
    'Parse the user input using regexes to extract intent & entities.'
    prefixes = re.escape(RegexInterpreter.allowed_prefixes())
    m = re.search((('^[' + prefixes) + ']?([^{]+)([{].+)?'), user_input)
    if (m is not None):
        event_name = m.group(1).strip()
        entities = RegexInterpreter._parse_parameters(m.group(2), m.start(2), m.end(2), user_input)
        return (event_name, entities)
    else:
        logger.warning("Failed to parse intent end entities from '{}'. ".format(user_input))
        return (None, [])
Parse the user input using regexes to extract intent & entities.
@staticmethod
def extract_intent_and_entities(user_input):
    
    prefixes = re.escape(RegexInterpreter.allowed_prefixes())
    m = re.search((('^[' + prefixes) + ']?([^{]+)([{].+)?'), user_input)
    if (m is not None):
        event_name = m.group(1).strip()
        entities = RegexInterpreter._parse_parameters(m.group(2), m.start(2), m.end(2), user_input)
        return (event_name, entities)
    else:
        logger.warning("Failed to parse intent end entities from '{}'. ".format(user_input))
        return (None, [])