RLIKE: Filtering Using a Regular Expression

RLIKE compares a string to a regular expression and accepts values that conform to the regular expression. A regular expression is a sequence of characters that define a search pattern. For complete information about regular expressions, you can search online.

Filter Using a Regular Expression

string RLIKE 'regex'

where:

string

Is a field containing the input string, or the input string enclosed in single quotation marks.

'regex'

Is the regular expression to be used for comparison, enclosed in single quotation marks.

Filtering Using a Regular Expression

FIRST_NAME RLIKE '^Ste(v|ph)en$' returns TRUE for field FIRST_NAME values starting with "Ste" followed by either "ph" or "v" and ending with "en".