> For the complete documentation index, see [llms.txt](https://guides.clickatell.com/flow/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guides.clickatell.com/flow/action-nodes/action-nodes-regular-expression.md).

# 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="/files/o2VxYVPjgl3Nbjr62uKX" 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 %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://guides.clickatell.com/flow/action-nodes/action-nodes-regular-expression.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
