pyarrow.compute.extract_regex#
- pyarrow.compute.extract_regex(strings,/,pattern,*,options=None,memory_pool=None)#
Extract substrings captured by a regex pattern.
For each string instrings, match the regular expression and, ifsuccessful, emit a struct with field names and values coming from theregular expression’s named capture groups. If the input is null or theregular expression fails matching, a null output value is emitted.
Regular expression matching is done using the Google RE2 library.
- Parameters:
- stringsArray-like or scalar-like
Argument to compute function.
- pattern
str Regular expression with named capture fields.
- options
pyarrow.compute.ExtractRegexOptions, optional Alternative way of passing options.
- memory_pool
pyarrow.MemoryPool, optional If not passed, will allocate memory from the default memory pool.
On this page

