On Thu, 07 Jul 2011 21:17:17 +0200, Mike Samuel <[email protected]> wrote:

One way to tell whether the group initialized to empty works on an
interpreter is to test
    /^(?:\1x(y)x){2}$/.test("xyxyxyx")
which is true in most interpreters, but false in Rhino1.7 and Chrome12.

I do believe it should be false. The captures are cleared for each iteration of a quantified atom (RepeatMatcher in section 15.10.2.5, step 4), so the \1 will
always be non-participating (and match the empty string).

Interestingly other perl 5 interpreters

I don't think ES RegExps should count as a PCRE :)

/L
--
Lasse Reichstein Holst Nielsen - [email protected]
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to