Regular Expression In Oracle SQL | Regexp_Like in Oracle SQL

preview_player
Показать описание
Symbol Description
* Matches zero or more occurrences
| Alternation operator for specifying alternative matches
^/$
Matches the start of line and the end of line
[] Bracket expression for a matching list matching any one of the expressions represented in the list
[^exp] If the caret is inside the bracket, it negates the expression.
{m} Matches exactly m times
{m,n} Matches at least m times but no more than n times
[: :] Specifies a character class and matches any character in that class
Class Description
[[:alnum:]] Matches all alphanumeric characters.
[[:alpha:]] Matches all alphabetic characters.
[[:blank:]] Matches all blank space characters.
[[:cntrl:]] Matches all non-printing control characters.
[[:digit:]] Matches all numeric digits.
[[:xdigit:]] Matches all hexadecimal characters.
[[:punct:]] Matches all punctuation characters.
[[:upper:]] Matches all upper case alphabets.
[[:lower:]] Matches all lower case alphabets.
[[:graph:]] Matches all [[:punct:]], [[:upper:]], [[:lower:]], and [[:digit:]] characters.
[[:print:]] Matches all printable characters.
[[:space:]] Matches all space characters like carriage return, newline, form feed and vertical tab.
[a-z] Matches all lower case alphabets. This is similar to [[:lower:]]. To match a set of lower case alphabets, specify a start and an end range. For e.g., [a-m] matches any lower case alphabet between the range a and m in the source string.
[A-Z] Matches all upper case alphabets. This is similar to [[:upper:]]. To match a set of upper case alphabets, specify a start and an end range. For e.g., [A-D] matches any uppercase alphabet between the range A and D in the source string.
[0-9] Matches all numeric digits. This is similar to [[:digits:]]. To match a set of digits, specify a start and an end range. For e.g., [0-5] matches the digits between the range 0 and 5 in the source string.
[A-Za-z0-9] Matches all the alphanumeric characters. This is similar to [[:alnum:]]. The combination can be changed as per the requirement like [A-Z0-9], [a-mA-N], [0-7a-oA-H], etc.

+ Matches one or more occurrences
? Matches zero or one occurrence
. Matches any character in the supported character set (except NULL)
() Grouping expression (treated as a single subexpression)
\n Backreference expression
[==]
Specifies equivalence classes
[..]
Specifies one collation element (such as a multicharacter element)

Operator Description
\d Match a digit character
\D Match a non-digit character
\w Match a word character
\W Match a non-word character
\s Match a whitespace character
\S Match a non-whitespace character
\A Match only at beginning of string
\Z Match only at end of string, or before newline at the end
\z Match only at end of string
i Match irrespective of case
Рекомендации по теме