REGEXP_SUBSTR('Yababa dababa do','(ab)\1'), backreference option : Group « Regular Expressions « Oracle PL / SQL






REGEXP_SUBSTR('Yababa dababa do','(ab)\1'), backreference option


SQL> --pattern is matched. If we use the backreference option, the query looks like this:
SQL>
SQL> SELECT REGEXP_SUBSTR('Yababa dababa do','(ab)\1')FROM dual;

REGE
----
abab

SQL>
           
       








Related examples in the same category

1.Group the letters 'ir' together by putting them in parentheses
2.Parenthesize both expressions
3.REGEXP_SUBSTR('Yababa dababa do','(ab)')
4.Using backreference: REGEXP_REPLACE('H1234 H4321 H2345','(.*) (.*) (.*)','\3, \2 \1')