<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _extract(expr, pat, flags=0, group=0):
 """ Find group in each string in the Series using passed regular expression. :param expr: :param pat: Pattern or regular expression :param flags: re module, e.g. re.IGNORECASE :param group: if None as group 0 :return: sequence or scalar """


    return _string_op(expr, Extract, _pat=pat, _flags=flags, _group=group)