Comment #2 on issue 1544 by mikesamuel: regular expression capturing group
problem
http://code.google.com/p/v8/issues/detail?id=1544
I may have been wrong that this was a bug.
Still under discussion, but
https://mail.mozilla.org/pipermail/es-discuss/2011-July/015758.html
On Thu Jul 7 14:46:59 PDT 2011 Brendan Eich brendan at mozilla.com wrote:
On Jul 7, 2011, at 2:40 PM, Lasse Reichstein wrote:
On Thu, 07 Jul 2011 21:17:17 +0200, Mike Samuel <mikesamuel at
gmail.com> 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).
Agreed.
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev