/\1/ could be a valid RegExp through Chapter 16 Extension clause?
reichsteinatwork at gmail.com
Thu Jul 7 00:39:42 PDT 2011
On Thu, Jul 7, 2011 at 3:52 AM, Mike Samuel <mikesamuel at gmail.com> wrote:
> Yes, by the extension, and whether a \<octal> is a backreference or an
> octal escape sequence is determined by whether there are
> parseInt(<octal>, 10) capturing groups to the left of it in the
> regular expression.
> matches the same language as
I don't think thats correct.
The \1 is a valid DecimalEscape, its value is 1, which is not greater than
NCapturingParens in 188.8.131.52 step 7 (NCapturingParens is defined globally
for the pattern, not just to the left of the current escape). I.e., it is
not a Syntax Error, so the \1 must be treated as a back-reference. It will
always be to a non-participating capture, so the regexp is equivalent to
but never to
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss