Returns `true` if the target value exactly matches the regular expression pattern.

## Sample usage

`REGEXP_MATCH(name, '[a-zA-Z].*')`

## Syntax

`REGEXP_MATCH X, regular_expression)`

### Parameters

- `X` - a field or expression to evaluate.

- `regular_expression` - a regular expression.

### Returns

The `REGEXP_MATCH` function returns **Boolean** data type values.

### Notes

Data Studio uses the RE2 expression syntax. For more details, see [Regular expressions in Data Studio](https://docs.cloud.google.com/data-studio/regular-expressions).

Note that patterns that contain escape characters such as `\` may require additional escaping in Data Studio, although this can be avoided with the use of [raw string literals](https://docs.cloud.google.com/data-studio/literals).

## Examples

| Example formula | Input | Output |
|---|---|---|
| ` REGEXP_MATCH(field_expression, 'A') ` | ABC123 | false |
| ` REGEXP_MATCH(field_expression, 'A.*') ` | ABC123 | true |
| ` REGEXP_MATCH(name, '[a-zA-Z].*') ` | Sam | true |
| ` REGEXP_MATCH(name, '[a-zA-Z].*') ` | $am | false |
| ` REGEXP_MATCH(country, '(USA|Canada|Mexico)') ` | Canada | true |
| ` REGEXP_MATCH(country, '(USA|Canada|Mexico)') ` | Brazil | false |

## Related resources

- [Regular expressions in Data Studio](https://docs.cloud.google.com/data-studio/regular-expressions)
- [Calculated fields](https://docs.cloud.google.com/data-studio/about-calculated-fields)
- [Data Studio function list](https://docs.cloud.google.com/data-studio/function-list)