pyarrow.compute.find_substring_regex#

pyarrow.compute.find_substring_regex(strings, /, pattern, *, ignore_case=False, options=None, memory_pool=None)#

Find location of first match of regex pattern.

For each string in strings, emit the index in bytes of the first occurrence of the given literal pattern, or -1 if not found. Null inputs emit null. The pattern must be given in MatchSubstringOptions.

Parameters:
stringsArray-like or scalar-like

Argument to compute function.

patternstr

Substring pattern to look for inside input values.

ignore_casebool, default False

Whether to perform a case-insensitive match.

optionspyarrow.compute.MatchSubstringOptions, optional

Alternative way of passing options.

memory_poolpyarrow.MemoryPool, optional

If not passed, will allocate memory from the default memory pool.