---
title: "regexp_matches function in Strata | Oplema"
description: "Check whether text contains a match for a regular expression. For example, regexp_matches('anabanana', '(an)*') returns true."
url: "https://oplema.com/docs/strata/functions/regexp-matches"
updated: "2026-11-04"
---

# regexp\_matches

Check whether text contains a match for a regular expression. An optional argument sets regex options.

## Try an expression

In [Formula](https://oplema.com/docs/strata/prep/formula), enter the expression and set Output type to **BOOLEAN**.

### Expression

```
regexp_matches('anabanana', '(an)*')
```

### Result

```
true
```

To use your own data, replace the example values with column names. Keep format strings and other options as written.

This Boolean expression also works in [Filter](https://oplema.com/docs/strata/prep/filter) custom mode. For the literal inputs above, the row goes to the True output. A missing result goes to False.

Try it live in Formula

Result
| id | result |
| --- | --- |
| 1 | true |

## Arguments and types

```
regexp_matches(string, regex, options)
```

**string**

Text

**regex**

Text

**options**

Text

Supported signatures (2)

```
regexp_matches(string: VARCHAR, regex: VARCHAR) → BOOLEAN
regexp_matches(string: VARCHAR, regex: VARCHAR, options: VARCHAR) → BOOLEAN
```

The result type can depend on the input types. See DuckDB for the full argument rules.

## Things to know

If the first argument is missing, the result is NULL.

## Related functions

[regexp\_extract

Return the part of text that matches a regular expression, or empty text if there is no match. An optional constant group number picks a capturing group, and regex options can follow.

](https://oplema.com/docs/strata/functions/regexp-extract)[regexp\_full\_match

Check whether all of the text matches a regular expression. An optional argument sets regex options.

](https://oplema.com/docs/strata/functions/regexp-full-match)[regexp\_extract\_all

Find every non-overlapping match of a regular expression in text and return them as a list. An optional group number picks a capturing group, and regex options can follow.

](https://oplema.com/docs/strata/functions/regexp-extract-all)[parse\_filename

Return the last component of a path, such as c.txt for a/b/c.txt. Set trim\_extension to true to remove the file extension. The optional separator can be system, both\_slash (default), forward\_slash or backslash.

](https://oplema.com/docs/strata/functions/parse-filename)

[Browse patterns](https://oplema.com/docs/strata/functions#patterns) [DuckDB documentation](https://duckdb.org/docs/current/sql/functions/text.html#regexp_matchesstring-regex-options)

Function metadata from DuckDB, used under the [MIT license](https://github.com/duckdb/duckdb/blob/v1.5.4/LICENSE).
