> 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.

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

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

Function arguments:

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

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

```
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://files.buildwithfern.com/sigma.docs.buildwithfern.com/5cb893ec8720b0c89d73944f7d34e18a27880e24fb826e35189eb4ca5ae95950/assets/docs-images/b8c66e9-image.png)

```
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`.

```
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://files.buildwithfern.com/sigma.docs.buildwithfern.com/6557e7beed73d8012828674804cd2497e5c5c0c183cb007ed1af323b531e81b1/assets/docs-images/0390b43-image.png)

```
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://files.buildwithfern.com/sigma.docs.buildwithfern.com/15de8d7f547c479d6ac2c69d01dd175d5e27f024e83456b6824668a1fff84977/assets/docs-images/078798b-3.png)

## Related resources

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