regexp_matches()

Returns true if string contains the regexp pattern, false otherwise. A set of optional options can be set.

Arguments & returns

2 overloads

regexp_matches(string, pattern[)

Scalar
Overload link stringpattern[ Returns
#01 VARCHARVARCHAR BOOLEAN

regexp_matches(string, pattern[, options])

Scalar
Overload link stringpattern[options] Returns
#02 VARCHARVARCHARVARCHAR BOOLEAN

Example

regexp_matches example
SQL
Haybarn WASM 1.5.5-rc3 · In your browser

Engine example · Run to view results.

In other engines

PostgreSQL

SELECT 'ThOmAs' ~* 'thomas'
In DuckDB
SELECT REGEXP_MATCHES('ThOmAs', 'thomas', 'i')

SQLGlot example ↗

Apache Hive

a RLIKE 'x'
In DuckDB
REGEXP_MATCHES(a, 'x')

SQLGlot example ↗

Dremioregexp_matches()

Same function

Prestoregexp_like()

REGEXP_LIKE(a, 'x')
In DuckDB
REGEXP_MATCHES(a, 'x')

SQLGlot example ↗