regexp_matches()

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

Arguments & returns

2 overloads

regexp_matches(string, regex)

Scalar
Overload link stringregex Returns
#01 VARCHARVARCHAR BOOLEAN

regexp_matches(string, regex, options)

Scalar
Overload link stringregexoptions 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 Haybarn
SELECT REGEXP_MATCHES('ThOmAs', 'thomas', 'i')

SQLGlot example ↗

Apache Hive

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

SQLGlot example ↗

Dremioregexp_matches()

Same function

Prestoregexp_like()

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

SQLGlot example ↗