# Regular Expression

The *Regular Expression* node allows you to match variables to a regular expression pattern and define what action comes next (either route the customer to a new step in the workflow or trigger a new workflow).

<figure><img src="https://content.gitbook.com/content/joAgInTNsBfDdfx1I23z/blobs/PKJC5F8nvh72UXV32BTz/image.png" alt="" width="563"><figcaption><p>Setup of a Regular Expression node</p></figcaption></figure>

### Examples:

Below are examples of commonly-used regular expressions:

| Regular Expression                                 | Description                                                                                                             |
| -------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| ((19\|20)\\\d\\\d)-(0?\[1-9]\|\[12]\[0-9]\|3\[01]) | Evaluates that an input is in the date format yyyy-mm-dd                                                                |
| ^\[a-zA-Z0-0]{4,16}$                               | Evaluates that an input is alphanumeric with a minimum of 4 and a maximum of 16 characters in length (e.g. a user name) |
| \[0-9]{4}                                          | Evaluates that an input is a 4-digit numeric code                                                                       |
| \[1\|2]{1}                                         | Evaluates that an input is either 1 or 2                                                                                |

{% hint style="info" %}
For more information on regular expressions, see the links below:

* <https://regex101.com/> (ensure you've selected the *ECMAScript (JavaScript)* flavor on the left).
* <https://ryanstutorials.net/regular-expressions-tutorial/>&#x20;
  {% endhint %}
