Database Reference
In-Depth Information
Return
. 0 (the default) returns the position of the target pattern,
and 1 returns the position after the target pattern.
Parameter
. This value can be set to three different values: c = case
sensitive, i = case insensitive, m = more than one line in the
source.
REGEXP_SUBSTR (source, pattern [, position [, occurrence [,
parameter ]]])
. Extracts a string from a string.
REGEXP_REPLACE (source, pattern [, replace [, position [,
occurrence [, parameter ]]]])
. Replaces a string within a string.
Regular expression functions are much like their relative Oracle built-in
string functions. See Chapter 9 for Oracle built-in string functions.
14.2.2
Regular Expression Patterns
Regular expression patterns are POSIX standard with some additions by
Oracle. It is not necessary to detail expression pattern-matching characters
because they can be found in Oracle documentation and online. The basics
are as shown in Table 14.1.
Table 14.1
Basic Regular Expression Pattern-Matching Characters.
Character
What Is It?
*
Zero or more.
.
Any character (not null).
?
Zero or one.
+
One or more.
|
OR
^
Start of line.
$
End of line.
[ … ]
List of elements allowing match of any
expression contained within.
( … )
Expression parentheses.
{ i }, { i, },
and
{ i, j }
i matches exactly, at least i matches, and at
least i matches but <= j.