Browse the docs
Parse node

RegEx

Match, extract, replace, or split text with a regular expression.

Category
Parse

What it does

Applies a regular expression to a text column, four ways: Match adds a true/false column; Replace rewrites matches; Parse pulls each capture group into its own typed column; Tokenize splits matches into columns or explodes them into rows.

Inputs and outputs

InputsOne.
OutputsOne.

When to use it

  • Pull parts out of messy text (an area code, a domain, an id) into clean columns
  • Flag or filter rows whose text matches a pattern
  • Standardize or scrub text by rewriting what matches
  • Split a repeating or delimited field into columns or rows

Examples

Parse named groups

(?<area>\d{3})-(?<line>\d{4})

Makes an 'area' and a 'line' column automatically.

Match

\d{5}(-\d{4})?

Adds a true/false column: does it look like a ZIP?

Replace with a group

(\d+)-(\d+)  →  $2/$1

Swaps the two numbers around.

Tokenize to rows

\w+  →  Rows

Each word becomes its own row.

Tips

  • Name a group with (?<name>…) and Parse auto-names the column after it.
  • Flags go inside the pattern: (?i) case-insensitive, (?m) multiline, (?s) dot matches newlines.
  • A value that doesn't match becomes null (Parse), false (Match) or stays unchanged (Replace). It never fails the run.
  • Look-ahead/behind and backreferences aren't supported; rewrite a look-around as a capture group and use Parse.
  • In Replace, $1 and ${name} insert captured text; write $$ for a literal dollar sign.