<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def regex_extract(arg, pattern, index):
 """ Returns specified index, 0 indexed, from string based on regex pattern given Parameters pattern : string (regular expression string) index : int, 0 indexed Returns ------- extracted : string """

    return ops.RegexExtract(arg, pattern, index).to_expr()