> ## Documentation Index
> Fetch the complete documentation index at: https://learn.workflow.dog/llms.txt
> Use this file to discover all available pages before exploring further.

# Matches Regex

> Test whether a regular expression matches any part of a string.

The **Matches Regex** action tests a string with a reusable **Regular
Expression** value. It returns `true` when the pattern finds a match anywhere
in the text.

## Inputs

| Input     | Type               | Required | Description                    |
| --------- | ------------------ | -------- | ------------------------------ |
| **Text**  | String             | Yes      | The text to test.              |
| **Regex** | Regular expression | Yes      | The pattern used for the test. |

## Outputs

| Output     | Type    | Description                                       |
| ---------- | ------- | ------------------------------------------------- |
| **Result** | Boolean | `true` when the regex matches; otherwise `false`. |

## Match the entire value

Regex matching is not automatically anchored. A pattern of `\d+` returns
`true` for `Order 1042 shipped` because a substring matches. Add anchors when
the whole value must follow the pattern:

```text theme={null}
^\d+$
```

With that pattern, `1042` matches and `Order 1042` does not. Enable the
**Multiline** flag only when `^` and `$` should also apply to individual lines.
