It should match. With brackets works (as in the specification asks for), try: (a)\g{-1} which matches string aa.
Browser
Chrome, Version 122.0.6261.111 (Official Build) (64-bit)
OS
Edition Windows 10 Home Single Language
Version 22H2
Installed on 21/07/05
OS build 19045.4046
Experience Windows Feature Experience Pack 1000.19053.1000.0
Bug Description
https://www.pcre.org/current/doc/html/pcre2syntax.html#SEC22 a line reads: "\g-n relative reference by number", note there is a DIFFERENT line quoting "\g{-n} relative reference by number", that one does work in regex101. This bug is not present on regexr, see it the regex works there, and both syntaxes are described here for pcre https://www.regular-expressions.info/backrefrel.html
Reproduction steps
This regex:
(a)\g-1
doesn't match stringaa
Expected Outcome
It should match. With brackets works (as in the specification asks for), try:
(a)\g{-1}
which matches stringaa
.Browser
Chrome, Version 122.0.6261.111 (Official Build) (64-bit)
OS
Edition Windows 10 Home Single Language Version 22H2 Installed on 21/07/05 OS build 19045.4046 Experience Windows Feature Experience Pack 1000.19053.1000.0