regexp

来源:互联网 发布:python 金字塔 编辑:程序博客网 时间:2024/05/21 09:51

Use /1, /2, /3, etc. through /9 to create backreferences to values matched by preceding subexpressions. You can backreference up to nine subexpressions, the first nine, in any expression. Subexpressions are numbered in the order in which their opening parentheses are encountered when scanning from left to right.

For example, to flip a name from last, first format to first last:

SELECT REGEXP_REPLACE(   'Sears, Andrew',   '(.+), (.+)','/2 /1')FROM dual;Andrew Sears
原创粉丝点击