Returns a transform that extracts a regex match from a string column.
Returns NA when no match is found. The result can be passed as the
transform argument to il_compare() or il_block_on(), and
composed with other transforms via il_transform(). On DuckDB and
PostgreSQL, the computation is pushed into SQL.
Examples
# Extract a 5-digit ZIP code from a freeform address string
tf <- il_regex_extract('\\d{5}')
tf(c('Apt 4, 90210', '10001-1234', 'no zip'))
#> [1] "90210" "10001" NA
