Have Questions?  Need Expert Answers?  JOIN LUNCH N' LEARNS!

Regular Expression Steps

Prev Next

Overview 

Regular Expressions (Regex) are patterns written in a formal language that can be interpreted by a regular expression processor to serve the function of text validation. Listed below are steps that use specific Regular Expressions to validate text input such as a phone number or email.


Regular Expression Steps

The Regular Expression Steps are located in the Toolbox panel under DATA > TEXT


Regex Does Not Match

The Regex Does Not Match step returns a true or false result if the validated String does not match the Input/Regex Patter. 

Input ParameterDescription
InputString value
PatternRegular expression pattern


Regex Get Matches

The Regex Get Matches step returns a count of matched results against a Regex text validation.

Input ParameterDescription
InputString value
RegexRegular expression pattern


Regex Get Matches Advanced

The Regex Get Matches Advanced step returns a list of matched validations utilizing a Regex pattern, a text input, and additional Regex options if desired.

Input ParameterDescription
InputString value
OptionsAdditional options to use with the Regular Expression
PatternRegular Expression


Regex Match

The Regex Match step returns a true or false as the result of Regex validation.

Input ParameterDescription
InputString value
PatternRegular Expression pattern


Regex Replace

The Regex Replace step looks up text input by the Regular Expression pattern and replaces text that matches the pattern.

Input ParameterDescription
InputString value
OptionsAdditional options for the Regular Expression
PatternRegular Expression pattern
ReplacementString value to replace input

Regular Expression

The Regular Expression step is used to identify patterns within Strings

Input ParameterDescription
InputString input value


Common Use Case Patterns 

The following Regex Patterns can be used in conjunction with the Regex Match step to perform some common text validation. For further information on Regular Expressions and how to configure them see: Microsoft: Regular Expression Language Quick Reference.
Type of ValidationRegex Pattern 
Email^\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$
Routing Number^((0[0-9])|(1[0-2])|(2[1-9])|(3[0-2])|(6[1-9])|(7[0-2])|80)([0-9]{7})$
Phone Number\(?\d{3}\)?-? *\d{3}-? *-?\d{4}
String (Only Numbers)^[0-9]+$
Zip Code^\d{5}(?:[-\s]\d{4})?$

Regex Match Example

The following example demonstrates the Regex Match step to see if a user inputted String is a zip code.

  1. Create a Flow
  2. Create a Form that takes in a user input using a Textbox control.
  3. Define a Data Name for the Textbox control
  4. In the Toolbox, expand Data > Text and place the Regex Match step onto the workspace.
  5. For the steps inputs, select the Form's output for the Input field and set Pattern as a constant. 
    Since a regular expression for zip code is being used, the following pattern was used: ^\d{5}(?:[-\s]\d{4})?$ 
  6. Add a Show Popup step to the outcome paths of the Regex Match step.
  7. The inputs can be defined as a Constant for the Show Popup step
  8. Debug the Flow. The pattern and the inputted String will determine the outcome path of the Flow.

For further information on Flows, visit the Decisions Forum.