regexp_count

Returns the number of occurrence of pattern in string.

Supported Signatures

function regexp_count(varchar, joniregexp) returns bigint

🔗 Official Documentation

regexp_extract

Returns the first substring matched in a string by the regular expression pattern.

Examples:

examples.sql
SELECT REGEXP_EXTRACT('email_address@gmail.com', '@(.*?)\.' -- value 'gmail'

Supported Signatures

function regexp_extract(varchar, joniregexp) returns varchar
function regexp_extract(varchar, joniregexp, bigint) returns varchar

🔗 Official Documentation

regexp_extract_all

Returns the substrings of a string matched by the regular expression pattern.

Supported Signatures

function regexp_extract_all(varchar, joniregexp) returns array<varchar>
function regexp_extract_all(varchar, joniregexp, bigint) returns array<varchar>

🔗 Official Documentation

regexp_like

Evaluates the regular expression pattern and determines if it is contained within string.

Examples:

examples.sql
SELECT REGEXP_like('email_address@gmail.com', '.*@.*\..*') AS is_valid_email -- value 'TRUE'

Supported Signatures

function regexp_like(varchar, joniregexp) returns boolean

🔗 Official Documentation

regexp_position

Returns the index of the first occurrence (counting from 1) of pattern in string. Returns -1 if not found.

Supported Signatures

function regexp_position(varchar, joniregexp) returns bigint
function regexp_position(varchar, joniregexp, bigint) returns bigint
function regexp_position(varchar, joniregexp, bigint, bigint) returns bigint

🔗 Official Documentation

regexp_replace

Removes every instance of the substring matched by the regular expression pattern from string.

Examples:

examples.sql
SELECT REGEXP_REPLACE('text foo another text', 'foo', 'bar') -- value 'text bar another text'

Supported Signatures

function regexp_replace(varchar, joniregexp, function(array<varchar>, varchar)) returns varchar

🔗 Official Documentation

regexp_split

Splits string using the regular expression pattern and returns an array. Trailing empty strings are preserved.

Supported Signatures

function regexp_split(varchar, joniregexp) returns array<varchar>

🔗 Official Documentation