def regex_body_parser(regex, flags=0):
    if isinstance(regex, basestring):
        regex = re.compile(regex, flags)

    def regex_parser_func(event, text):
        match = regex.search(text)
        if match:
            for k, v in match.groupdict().iteritems():
                try:
                    event.fields[k] = int(v)
                except ValueError:
                    event.fields[k] = v

    return regex_parser_func
Creates a new database.
dataset/ETHPy150Open ARM-software/workload-automation/wlauto/utils/trace_cmd.py/regex_body_parser--crossover with--dataset/ETHPy150Open nephics/tornado-couchdb/couch/couch.py/AsyncCouch.create_db