REGEXP_LIKE

REGEXP_LIKE(inputString, regexString [, flagsString])

Description

Matches string to a regular expression. For details, see the Java Matcher.find() method. If any parameter is null (except optional flagsString parameter), the result is null.

Flags values limited to 'i', 'c', 'n', 'm'. Other symbols causes exception. Multiple symbols could be uses in one flagsString parameter (like 'im'). Later flags overrides first ones, for example 'ic' equivalent to case sensitive matching 'c'.

  • 'i' enables case insensitive matching (Pattern.CASE_INSENSITIVE)

  • 'c' disables case insensitive matching (Pattern.CASE_INSENSITIVE)

  • 'n' allows the period to match the newline character (Pattern.DOTALL)

  • 'm' enables multiline mode (Pattern.MULTILINE)

Examples

SELECT REGEXP_LIKE(name, '[A-Z ]*', 'i') FROM Players;