© Copyright 2024 Clickatell. All rights reserved.
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).
Below are examples of commonly-used regular expressions:
For more information on regular expressions, see the links below:
(ensure you've selected the ECMAScript (JavaScript) flavor on the left).
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 |