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.

Data Types

Return

string

regex

Boolean

String

String

Example

The following example uses the REGEXP_SEARCH function to determine if the value in the StockName column has the string "Corp" at the end:

INSERT INTO OutStream
SELECT REGEXP_SEARCH(Trades.StockName, "Corp$")
FROM Trades;