RegEx Tool

The Regular Expression tool uses regular expression syntax to parse, match, or replace data.

Regular expression support

While regular expressions are supported in Designer, users are responsible for their own expressions and how the expressions impact their data.

For more resources on how to write regular expressions, see www.regexlib.com, a site unaffiliated with Alteryx, or the RegEx Coach, a unaffiliated graphical application for Windows which can be used to experiment with (Perl-compatible) regular expressions interactively.

For additional information about Boost RegEx, see the following:

Configure the tool

  1. Select the Field to Parse.
  2. Enter your Regular Expression. The drop down provides common regular expressions that you may need while creating your expression. More information can be found on the website Perl Regular Expression Syntax.
  3. Case Insensitive: Selected by default. Searches do not distinguish between uppercase and lowercase letters.

  4. Select the Output Method to use when parsing. Then configure the related Properties.
    • Replace: Replace the expression you searched for with a second expression.
      • Replacement Text: Enter an expression to replace your original regular expression by identifying the Marked Group to replace the expression with. The drop down provides common regular expressions that you may need while creating your expression.
      • Copy Unmatched Text to Output
    • Tokenize: Split the incoming data using a regular expression. This options works similarly to the Text To Columns Tool, except instead of matching and removing what you do not want, you match for what you want to keep. You want to match to the whole token, and if you have a marked group, only that part is returned.
      • Split to Columns: Split a single column of data at each instance of the specified delimiter into multiple columns.
        • # of Columns: Set how many columns are created.
        • Extra Columns: Select the behavior that is applied to extra columns.
          • Drop Extra with Warning: Data that extends past the split is dropped and a warning is generated indicating that there was excess information.
          • Drop Extra without Warning: Data that extends past the split is dropped and no warning is generated.
          • Error: Data the extends past the split causes an error and the workflow stops processing.
        • Output Root Name: Enter the name for the newly generated columns to be based off of. The new columns are named as the root name with a serially increasing integer appended.
      • Split to Rows: Split a single column of data at each instance of the specified delimiter into multiple rows. Use a key column in your record so you don't lose track of which value came from which row.
    • Parse: Separate the expression into new columns, and set the name, type, and size of the new columns.
      • A new column is created in the Output Fields table. In the table:
        • Click on column names to rename.
        • Use the drop down to select the new data type.
        • Enter the new size.
        • Expression is populated automatically.
    • Match: Append a column containing a number; 1 if the expression matched, 0 if it did not.
      • Match Status Field Name: Provide a name for the appended column.
      • Error if not Matched: Select to throw an error if the expression and string do not match to end the workflow processing.