Is it possible to refer to a 10th and subsequent replacement strings in Oracle's regexp_replace?
In Oracle's regexp_replace
function, there is a parameter replace_string
in which you can specify backreferences 开发者_JAVA技巧\1
to \9
.
Is there a way to refer to backreferences after the 9th one? Oracle treats \10
as \1
followed by a literal 0
.
Nope, nine is the max.
\n
Backreference
Matches the nth preceding subexpression, that is, whatever is grouped within parentheses, where n is an integer from 1 to 9.
-- http://download.oracle.com/docs/cd/E11882_01/appdev.112/e10471/adfns_regexp.htm#ADFNS1013
Note that this is not an Oracle limitation. Many (most?) regex implementations' maximum is nine.
精彩评论