Regular Expression Steps
- 02 Jul 2021
- 1 Minute to read
- Print
- DarkLight
This documentation version is deprecated, please click here for the latest version.
Regular Expression Steps
- Updated on 02 Jul 2021
- 1 Minute to read
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
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. By utilizing the host of Regex steps offered by Decisions, users can use specific Regular Expressions to validate text input such as a phone number of email. This document demonstrates how to validate some common text use cases via Regular Expressions and serves as a discussion of the Regex steps available in Decisions.
Flow Steps
The Decisions Studio provides five primary Regular Expression steps in the Flow Designer for validating text input. These steps can be found by navigating to Steps > Data > Text.
The included steps and their functions are as follows:
Step | Function |
---|---|
Regex Match | Returns a True or False as the result of Regex validation. |
Regex Replace | Allows users the ability to replace or remove characters utilizing a Regex pattern to find the matching value, and the Options input as a way of providing additional text handling. |
Regex Get Matches | Returns a count of matched results against a Regex text validation. |
Regex Get Matches Advanced | Returns a list of matched validations utilizing a Regex pattern, a text Input, and additional Regex Options if desired. |
Regex Does Not Match | Returns a True or False result for if the validated String does not match the Input/Regex Pattern. |
Common Use Case Patterns
Additional Information on Regular Expressions
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 Validation | Regex Pattern |
---|---|
^\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})?$ |
Was this article helpful?