Appearance
REGEXP_LIKE
Return t if the pattern matches at least one occurrence in the input.
Return f if there is no match.
Syntax
result = REGEXP_LIKE(input, pattern [, start [, reference]] [, flags])- input value
Specify the value against which the regular expression is matched.
- pattern value
Specify the regular expression to be matched against the
input.The
patternvalue must be a constant string and cannot be a column reference.- start value
The position in the
inputfrom where thepatternmatch starts. The default start position is 1.Yellowbrick does not support special meanings for negative
startvalues.The
startvalues can be column references.- reference value
Specify which
patternmatch is of interest.The
referencevalues can be column references.Note: The
referenceparameter forREGEXP_LIKEis supported by Yellowbrick but may not be supported by other databases.- flags value
Can be either
ifor case-insensitive matching orcfor case-sensitive matching. Matching is case-sensitive by default.The
flagsvalue must be a constant string and cannot be a column reference.
Return
If the pattern matches the input at least once, the function returns t.
If the pattern does not match the input, the function returns f.
Example
premdb=> select name from team where REGEXP_LIKE(name, '([a-z])\1\M');
name
--------------
Cardiff City
Hull City
(2 rows)