Oracle SQL supports four functions:
These SQL functions support regular expressions.
The following table shows the most important regular expression metasymbols and their meanings.
Type | Description |
---|---|
Postfix | the operator follows its operand |
Prefix | the operator precedes its operand |
Infix | the operator separates its operands |
Nothing (empty) | the operator has no operands |
Common Regular Expression Operators and Metasymbols
Operator | Type | Description |
---|---|---|
* | Postfix | Zero or more occurrences |
+ | Postfix | One or more occurrences |
? | Postfix | Zero or one occurrence |
| | Infix | Operator to separate alternative choices |
^ | Prefix | Beginning of a string, or position immediately following a newline character |
$ | Postfix | End of the line |
. | -- | Any single character |
[[^]list] | -- | One character out of a list; a circumflex (^) at the beginning works as a negation; a dash (-) between two characters works as a range indicator |
( ) | -- | Groups a (sub)expression, allowing you to refer to it further down in the expression |
{m} | Postfix | Precisely m times |
{m,} | Postfix | At least m times |
{m,n} | Postfix | At least m times, and at most n times |
\n | -- | Refers back to the nth subexpression between parentheses (n is a digit between 1 and 9) |
If the square brackets notation does not give you enough precision or flexibility, use multicharacter collation elements, character classes, and equivalence classes, as follows: