regexp_search()

Scalar. Determines whether or not a string contains a match for a POSIX regular expression pattern.

Syntax

regexp_search ( string, regex )

Parameters

string

A string.

regex

A POSIX regular expression pattern. This pattern is limited to the Perl Syntax.

Usage

Determines whether or not a string contains a match for a POSIX regular expression pattern. The function returns the Boolean expression corresponding to whether or not the string contains the pattern (TRUE or FALSE).

The function works with UTF-8 strings if the -U server option is specified.

Example

regexp_search('aaadogaaa', '[b-z]*') returns TRUE.

regexp_search('h', '[i-z]*') returns FALSE.