Regexp capturing groups.

Markus Jarderot marjar-4 at
Mon Sep 15 11:51:41 PDT 2008

Brendan Eich wrote:
> Steven did file
> I'll champion fixing this, somehow, in Harmony. We should get  
> Waldemar's opinion on it.
> /be

#376 seems to only concern the issue of back-references to 
non-participating capture-groups.
What I described was back-references to capture-groups within a 
repetition. As the algorithm in the ECMA-262v3 is currently written, any 
captures from the last iteration should be discarded.
#376 mentions it, but also says that this deserves a separate ticket. I 
have not found any ticket on this specific issue.

I have recently found that also Google Chrome keeps the captures between 

URI: javascript:alert(/(?:(a)|(b))*/.exec("ababa"))

Firefox 3.0.1:
"ababa,a," <-- no "b"

Internet Explorer 7.0.5730.11 and Google Chrome
"ababa,a,b" <-- "b" in the end

Markus Jarderot

More information about the Es-discuss mailing list