regexp_extract_all
Find every non-overlapping match of a regular expression in text and return them as a list. An optional group number picks a capturing group, and regex options can follow.
Try an expression
In Formula, enter the expression and set Output type to VARCHAR.
Expression
regexp_extract_all('Ada: 12, Lin: 34', '[0-9]+')Result
'[12, 34]'The expression returns VARCHAR[]. Formula stores it as VARCHAR in this example. To use your own data, replace the example values with column names. Keep format strings and other options as written.
Arguments and types
regexp_extract_all(string, regex, group, options)- string
- Text
- regex
- Text
- group
- Number, List
- options
- Text
Supported signatures (5)
regexp_extract_all(string: VARCHAR, regex: VARCHAR) → VARCHAR[]
regexp_extract_all(string: VARCHAR, regex: VARCHAR, group: INTEGER) → VARCHAR[]
regexp_extract_all(string: VARCHAR, regex: VARCHAR, group: INTEGER, options: VARCHAR) → VARCHAR[]
regexp_extract_all(string: VARCHAR, regex: VARCHAR, group: VARCHAR[]) → VARCHAR[]
regexp_extract_all(string: VARCHAR, regex: VARCHAR, group: VARCHAR[], options: VARCHAR) → VARCHAR[]The result type can depend on the input types. See DuckDB for the full argument rules.
Things to know
If the first argument is missing, the result is NULL.
Function metadata from DuckDB, used under the MIT license.