Table 4-1 SQL Regular Expression Functions and Conditions
Table 4-2 POSIX Metacharacters in Oracle Database Regular Expressions
Syntax | Operator Name | Description | Example |
---|---|---|---|
|
Any Character — Dot |
Matches any character in the database character set. If the Note: In the POSIX standard, this operator matches any English character except NULL and the newline character. |
The expression |
|
One or More — Plus Quantifier |
Matches one or more occurrences of the preceding subexpression. |
The expression |
|
Zero or One — Question Mark Quantifier |
Matches zero or one occurrence of the preceding subexpression. |
The expression |
|
Zero or More — Star Quantifier |
Matches zero or more occurrences of the preceding subexpression. By default, a quantifier match is greedy because it matches as many times as possible while still allowing the rest of the match to succeed. |
The expression |
|
Interval—Exact Count |
Matches exactly |
The expression |
|
Interval—At Least Count |
Matches at least |
The expression |
|
Interval—Between Count |
Matches at least |
The expression |
|
Matching Character List |
Matches any single character in the list within the brackets. The following operators are allowed within the list, but other metacharacters included are treated as literals:
A dash ( Note: In the POSIX standard, a range includes all collation elements between the start and end of the range in the linguistic definition of the current locale. Thus, ranges are linguistic rather than byte values ranges; the semantics of the range expression are independent of character set. In Oracle Database, the linguistic range is determined by the |
The expression |
|
Non-Matching Character List |
Matches any single character not in the list within the brackets. Characters not in the non-matching character list are returned as a match. Refer to the description of the Matching Character List operator for an account of metacharacters allowed in the character list. |
The expression The expression |
|
Or |
Matches one of the alternatives. |
The expression |
|
Subexpression or Grouping |
Treats the expression within parentheses as a unit. The subexpression can be a string of literals or a complex expression containing operators. |
The expression |
|
Backreference |
Matches the nth preceding subexpression, that is, whatever is grouped within parentheses, where Oracle supports the backreference expression in the regular expression pattern and the replacement string of the |
The expression A backreference enables you to search for a repeated string without knowing the actual string ahead of time. For example, the expression |
|
Escape Character |
Treats the subsequent metacharacter in the expression as a literal. Use a backslash (\) to search for a character that is normally treated as a metacharacter. Use consecutive backslashes ( |
The expression |
|
Beginning of Line Anchor |
Matches the beginning of a string (default). In multiline mode, it matches the beginning of any line within the source string. |
The expression |
|
End of Line Anchor |
Matches the end of a string (default). In multiline mode, it matches the beginning of any line within the source string. |
The expression |
|
POSIX Character Class |
Matches any character belonging to the specified POSIX character Note: In English regular expressions, range expressions often indicate a character class. For example, |
The expression |
|
POSIX Collating Element Operator |
Specifies a collating element to use in the regular expression. The |
The expression |
|
POSIX Character Equivalence Class |
Matches all characters that are members of the same character equivalence class in the current locale as the specified The character equivalence class must occur within a character list, so the character equivalence class is always nested within the brackets for the character list in the regular expression. Usage of character equivalents depends on how canonical rules are defined for your database locale. Refer to the Oracle Database Globalization Support Guide for more information on linguistic sorting and string searching. |
The expression |
See Also:
Oracle Database SQL Reference for syntax, descriptions, and examples of theREGEXP
functions and conditions참고 문서 주소 : http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14251/adfns_regexp.htm#sthref534