@transformer<EOL>def regexp(input, **params):
PARAM_FIELD_TO_PARSE = '<STR_LIT>'<EOL>PARAM_PATTERN = '<STR_LIT>'<EOL>PARAM_OUTPUT = '<STR_LIT>'<EOL>OUT_DESC_FIELD = '<STR_LIT>'<EOL>OUT_DESC_IDX = '<STR_LIT>'<EOL>OUT_DESC_TYPE = '<STR_LIT:type>'<EOL>res = []<EOL>regex = re.compile(params.get(PARAM_PATTERN))<EOL>field2parse = params.get(PARAM_FIELD_TO_PARSE)<EOL>out_desc = params.get(PARAM_OUTPUT)<EOL>for row in input:<EOL><INDENT>matches = regex.findall(row[field2parse])[<NUM_LIT:0>]<EOL>obj = {}<EOL>for desc in out_desc:<EOL><INDENT>obj[desc[OUT_DESC_FIELD]] = Converter.convert(matches[desc[OUT_DESC_IDX]], desc[OUT_DESC_TYPE])<EOL><DEDENT>res.append(obj)<EOL><DEDENT>return res<EOL>
Parses input according to pattern
:param input:
:param params:
:return: