Shape · Text
Regex Extract
Pulls pieces out of text with a regular expression, one new column per capture group, such as a postcode from an address.
Also known as: Regular expression, pattern
How it works
Pick the Source column and type a Pattern: an RE2 regular expression with at least one capture group (no lookaround or backreferences). The panel shows one box under Group names per group; each becomes a new column, appended after the input columns, so the source column stays. On no match is NULL by default, which gives nulls in every group column for a value the pattern does not match, or Error, which stops the run and quotes the first value that failed. Patterns with more than nine groups work too.
Inputs and outputs
Inputs
data— Table
Outputs
data— Table
Settings
The Attributes panel of Regex Extract, as in the app: the controls work, but nothing runs — there is no data behind it.
The same settings, as the Assistant writes them
{
column: string
pattern: string
groupNames: string[]
noMatch: "null"|"error"
}pattern = an RE2 regex (DuckDB regexp_extract: no lookaround, no backreferences); each capture group becomes a column named by groupNames in order, e.g. pattern "([A-Z]+)-([0-9]+)" with groupNames ["prefix", "number"]
Example
Order references look like EU-2026-00417. Pattern ([A-Z]+)-(\d{4})-(\d+) with group names market, year and number.
| ref | market | year | number |
|---|---|---|---|
| EU-2026-00417 | EU | 2026 | 00417 |
| pending | NULL | NULL | NULL |