Skip to main content

Extract with pattern

Take the parts of a text a pattern describes, e.g. the date, number and amount of "Invoice 42 of 2026-11-16: 99.50"; named parts come back as a Dictionary.

Command in the String toolkit · id ooa.string/extract_pattern · 4 inputs (2 required), 4 outputs

Inputs​

InputTypeRequiredDefaultWhat it is
TextStringYesText to read.
PatternStringYesA regular expression with bracket groups, named like (?<total>[\d.]+) if you want them by name.
OccurrenceNumberNo1Which match to take: 1 for the first.
Ignore caseBooleanNofalseUpper and lower case alike.

Outputs​

OutputTypeWhat it is
foundBooleanTrue when the pattern was found.
matchStringThe whole match.
groupsListEach bracket group, in order.
namedDictionaryEach named group (?<name>...) by its name.