I wrote: > So AFAICS Perl is acting in the way I'm attributing to POSIX. > But maybe we should actually read POSIX ...
I went to look at the POSIX spec, and was reminded that it lacks backrefs altogether. (POSIX specifies the "BRE" and "ERE" regex flavors as described in our docs, but not "ARE".) So there's no help to be had there. The fact that Perl doesn't throw an error is probably the most useful precedent available. regards, tom lane