There are four functions that support regular expressions in ORACLE:
1. REGEXP_LIKE: similar to LIKE
2. REGEXP_INSTR: similar to INSTR
3, REGEXP_SUBSTR: similar to SUBSTR
4. REGEXP_REPLACE: similar to REPLACE
They are used in the same way as Oracle SQL functions LIKE, INSTR, SUBSTR, and REPLACE,
However, they use POSIX Regular Expressions instead of the old percent sign (%) and wildcard character.
POSIX regular expressions are composed of standard metacharacters:
'^' Matches the start position of the input string and is used in the square brackets expression. In this case, this character set is not accepted.
'$' Matches the end position of the input string. If the Multiline attribute of the RegExp object is set
'\ N' or' \ R '.
'.' Matches any single character except the line break.
'? 'Match the previous subexpression zero or once.
'+' Matches the previous subexpression once or multiple times.
'*' Matches the previous subexpression zero or multiple times.
'|' Indicates an option between the two items. Example '^ ([a-z] + | [0-9] +) $' indicates the combination of all lowercase letters or numbers
String.
'()' Indicates the start and end positions of a subexpression.
'[]' Indicates a bracket expression.
'{M, n}' indicates the exact number of occurrences. m = <number of occurrences <= n, '{m}' indicates m occurrences, '{m ,} 'indicates at least
Appears m times.
\ Num matches num, where num is a positive integer. References to the obtained matching.
Character cluster:
[[: Alpha:] any letter.
[[: Digit:] any number.
[[: Alnum:] Any letter or number.
[[: Space:] any white characters.
[[: Upper:] Any uppercase letter.
[[: Lower:] Any lowercase letter.
[[: Punct:] Any punctuation marks.
[[: Xdigit:] Any hexadecimal number, which is equivalent to [0-9a-fA-F].
Operation priority of various operators
\ Escape Character
(),(? :),(? =), [] Parentheses and square brackets
*, + ,?, {N}, {n ,}, {n, m} qualifier
^, $, Anymetacharacter location and Sequence
|
Author: "The blog of tantousha"