> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://help.sigmacomputing.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://help.sigmacomputing.com/_mcp/server.

# RegexpMatch

> Returns True if a string matches a regular expression.

Returns True if a string matches a regular expression.

> **Info**
>
> This function isn't compatible with all data platform connections. To check if your connection supports it, see [Supported data platforms and feature compatibility](/docs/region-warehouse-and-feature-support#supported-data-platforms-and-feature-compatibility).

## Syntax

```sigma
RegexpMatch(string, pattern)
```

Function arguments:

* **string** (required): The string to search.
* **pattern** (required): The pattern to match within the string.

> **Info**
>
> When the regular expression you want to use contains a slash, quotation or other special character, you will need to use a backslash () to escape the special character.

## Notes

* When any of the arguments are `Null`, the function returns `Null`.
* Regular expressions vary by database. Check the documentation of your data platform for syntax.

## Examples

```sigma
RegexpMatch([Name], "^[A-Z]{1}[a-z]+ [A-Z]{1}[a-z]+$")
```

Checks if a name starts with an uppercase letter, followed by one or more lowercase letters, and then has another uppercase letter followed by one or more lowercase letters.

![In a table with columns Name and RegexpMatch, the string Sigma Computing - capital S and C - returns True and the string sigma computing - lowercase s and c - returns false.](https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/sigma.docs.buildwithfern.com/5cb893ec8720b0c89d73944f7d34e18a27880e24fb826e35189eb4ca5ae95950/assets/docs-images/b8c66e9-image.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA6KXJSKKNFOCF7G4B%2F20261007%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20261007T055905Z&X-Amz-Expires=604800&X-Amz-Signature=48d43efcc292ec23bd1a7d476cea8bd268efafe323a3f669309f0a3f5d79808a&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject)

```sigma
RegexpMatch("123-45-6789", "[0-9]{3}-[0-9]{2}-[0-9]{4}")
```

Checks if a string matches the social security pattern 'xxx-xx-xxxx'. Returns `True`.

```sigma
RegexpMatch([Phone Number], "\\(\\d{3}\\) \\d{3}-\\d{4}")
```

Checks if a string matches the phone number pattern '(xxx) xxx-xxxx'

![In a table with columns Phone Number and RegexpMatch Phone Number, (555) 555-5555 returns True, while 0123456789 returns False](https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/sigma.docs.buildwithfern.com/6557e7beed73d8012828674804cd2497e5c5c0c183cb007ed1af323b531e81b1/assets/docs-images/0390b43-image.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA6KXJSKKNFOCF7G4B%2F20261007%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20261007T055905Z&X-Amz-Expires=604800&X-Amz-Signature=030a7ed63066d34e366e4ee60a689875af25391fb2f171bd5a183f8b6d96a658&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject)

```sigma
RegexpMatch([Address], "^[0-9]+")
```

Checks if an address starts with numeric characters.

![In a table with columns Address and RegexpMatch, three street addresses that start with numbers all return True](https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/sigma.docs.buildwithfern.com/15de8d7f547c479d6ac2c69d01dd175d5e27f024e83456b6824668a1fff84977/assets/docs-images/078798b-3.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA6KXJSKKNFOCF7G4B%2F20261007%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20261007T055905Z&X-Amz-Expires=604800&X-Amz-Signature=bec0aecb7af2be85026ebf73fe41888c9978cfc223224d4dfa825764b7d371d4&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject)

## Related resources

* [Contains](/docs/contains)
* [RegexpCount](/docs/regexpcount)
* [RegexpExtract](/docs/regexpextract)
* [RegexpReplace](/docs/regexpreplace)