Search notes:

ORA-12727: invalid back reference in regular expression

Ok:
select
   regexp_substr('foo bar baz', 'foo bar (\w*)', '\1')
from
   dual;
Also ok, although \2 references a group that does not exist in the pattern.
select
   regexp_replace('foo bar baz', 'foo bar (\w*)', '\2')
from
   dual;
Also ok:
select
   regexp_replace('abc def ghi ghi jkl', '.* (\w+) \1.*', '\1')  ghi
from
   dual;
This causes ORA-12727: invalid back reference in regular expression because \2 references a group that is not defined in the pattern.
select
   regexp_replace('abc def ghi ghi jkl', '.* (\w+) \2.*', '\1')  ghi
from
   dual;

See also

Other Oracle error messages

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1740433721, '18.118.149.14', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/databases/Oracle/errors/ORA-12727_invalid-back-reference-in-regular-expression(61): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78