Text

RegexExtract

Pulls a specific piece out of messy text by describing its pattern, such as an invoice number buried in a memo line or digits mixed into a reference field. It returns the first stretch of text that fits the pattern, the fragment itself rather than the whole string.

Inputs

InputAcceptsRequired
TextTextYes
PatternTextOptional

Outputs

OutputProduces
ResultText

Settings

Typed in on the node or set by the assistant, not wired.

SettingDefaultNotes
PatternThe pattern to look for, written as a regular expression. \d+ matches the first run of digits, INV-\d+ matches an invoice number like INV-20443, [A-Z]{3} matches a three-letter code. Only the first match is returned.

Example

Bank statement memos arrive as free text like Payment for INV-20443, net 30. Set Pattern to INV-\d+ and the node returns INV-20443, a clean invoice reference you can match against your receivables table. If a memo contains no invoice number, nothing is returned for that value.

Tips

Patterns are exact about case and spacing. If extracts come back empty, test the pattern against one real memo first, then widen it: INV[- ]?\d+ also accepts INV 20443 and INV20443.

Related nodes