REGEXP_LIKE
functionsupportedCore SQL functionsPerforms a comparison to determine whether a string matches a specified pattern. Both inputs must be text expressions. REGEXP_LIKE is similar to the LIKE function, but with POSIX extended regular expressions instead of SQL LIKE pattern syntax. REGEXP_LIKE supports more complex matching conditions than LIKE. Tip You can use the search optimization service to improve the performance of queries that call this function. For details, see Search optimization service. Aliases: RLIKE (1st syntax)
Syntax
supportedpartialnot supportednot scored
REGEXP_LIKE( <subject> , <pattern> [ , <parameters> ] )
Parameters
| Name | Required | Description |
|---|---|---|
subject | required | The string to search for matches. |
pattern | required | Pattern to match. For guidelines on specifying patterns, see String functions (regular expressions). |
Returns
Returns a BOOLEAN value or NULL: - Returns TRUE if there is a match. - Returns FALSE if there isn’t a match. - Returns NULL if any argument is NULL.
Usage notes
- The function implicitly anchors a pattern at both ends (for example, '' automatically becomes '^$', and 'ABC' automatically becomes '^ABC$'). For example, to match any string starting with ABC, the pattern is 'ABC.*'.
- The backslash character (\) is the escape character. For more information, see Specifying regular expressions in single-quoted string constants.
- For more usage notes, see the General usage notes for regular expression functions.
Collation Details
Arguments with collation specifications currently aren’t supported.