Oracle uses a regular expression of 4 functions:
1. Regexp_like (Expr_col, ' regular expression ')
2. Regexp_substr (Expr_col, '
3. Regexp_instr
4. Regexp_replace
POSIX Regular expressions are composed of standard metacharacters (metacharacters):
' ^ ' matches the starting position of the input string, which is used in a square bracket expression, which indicates that the character set is not accepted.
' $ ' matches the end position of the input string. If the Multiline property of the RegExp object is set, then $ also matches ' \ n ' or ' \ R '.
'. ' matches any single character except for a newline character.
'? ' matches the preceding subexpression 0 or one time.
' + ' matches the preceding sub-expression one or more times.
' * ' matches the preceding subexpression 0 or more times.
' | ' indicates a choice between the two items. Example ' ^ ([a-z]+|[ 0-9]+) $ ' represents all lowercase letters or numbers combined into a string.
' () ' marks the start and end position of a subexpression.
' [] ' marks a bracket expression.
' {m,n} ' an exact occurrence of the frequency range,m=< occurrences <=n, ' {m} ' indicates the presence of M times, ' {m,} ' indicates at least m times.
\num matches num, where num is a positive integer. A reference to the obtained match.
Character clusters:
[[: Alpha:]] any letter.
[[:d Igit:]] any number.
[[: Alnum:]] Any letters and numbers.
[[: Space:]] any whitespace character.
[[: Upper:]] any uppercase letters.
[[: Lower:]] any lowercase letter.
[[:p UNCT:]] any punctuation.
[[: Xdigit:]] Any 16 binary number, equivalent to [0-9a-fa-f].
Operator precedence for various operators
\ escape Character
(), (?:), (? =), [] parentheses and square brackets
*, +,?, {n}, {n,}, {n,m} qualifier
^, $, anymetacharacter position and order
|
*/
An introduction to the Oracle regular expression functions and regular expressions