<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _ibis_sqlite_regex_extract(string, pattern, index):
 """Extract match of regular expression `pattern` from `string` at `index`. Parameters string : str pattern : str index : int Returns ------- result : str or None """

    result = re.search(pattern, string)
    if result is not None and 0 <= index <= (result.lastindex or -1):
        return result.group(index)
    return None