Skip to content

regex

Written as regex(argnum flags):options in a transform expression.

Minimum arguments 1
Maximum arguments 1
Default arguments 1
Argument modes SINGLE_PRIMITIVE

Extract data from text using regular expressions with flexible group joining options.

Features:

  • Supports standard Python regex syntax
  • Flexible handling of capture groups with different joiners
  • Automatically handles None values (returns None if input is None)

Joiner Options:

  • Specify joiner after regex using ‘,,’ separator
  • Supported joiners: ‘’, ’ ’, ‘,’, ‘,,’, ‘/’, ‘//’
  • Default joiner is ‘//’ (when no joiner specified)
  • Empty joiner ‘’ can be specified explicitly with ‘,,’

Important Notes:

  • The joiner specification affects how multiple capture groups are combined:
    • ‘//’ joins with forward slashes (default)
    • ‘,’ joins with commas
    • ’ ’ joins with spaces
    • ‘’ concatenates without separator
  • The transform will return None if no matches are found
Flag Letter
noncaptive_input I
Input args: ["Name: John, Age: 30"]
Transforms: "regex:Name: (\\w+), Age: (\\d+)"
Output: "John//30"
Input args: ["2023-01-15"]
Transforms: "regex:(\\d{4})-(\\d{2})-(\\d{2}),,,"
Output: "2023,01,15"
Input args: ["Color: Red, Size: Large"]
Transforms: "regex:Color: (\\w+), Size: (\\w+),, "
Output: "Red Large"
Input args: ["ID: ABC123"]
Transforms: "regex:ID: (\\w{3})(\\d{3}),,"
Output: "ABC123"
Input args: ["Error: File not found"]
Transforms: "regex:Error: (.+)"
Output: "File not found"