On Sat, Oct 22, 2011 at 5:30 PM, Yusuke Suzuki <utatane....@gmail.com> wrote:
> BTW, I thought that the example in > http://wiki.ecmascript.org/doku.php?id=strawman:match_web_reality_spec > exec(/(?=a)+/, ""); > should return false. Is it right? In ES5, it should be a syntax error. The positive look-ahead is an Assertion, not an Atom, and quantifiers can only be applied to Atoms. In ES3, the regexp will not match the string literal. Putting quantifiers on look-aheads is always unnecessary in ECMAScript, since it's always equivalent to either requiring zero or one match of the lookahead. The "web reality" is that browser RegExp engines follow the ES3 syntax for this case. /L > > On Sat, Oct 22, 2011 at 5:04 AM, Allen Wirfs-Brock > <al...@wirfs-brock.com> wrote: >> >> On Oct 20, 2011, at 10:17 PM, Yusuke Suzuki wrote: >> >> >> And, I tried to implement RegExp.prototype.compile, but ES5 and ES3 >> not defined its standard behavior and I thought compile method is >> changing RegExp#source / #global / #ignoreCase / #multiline which >> writable attribute are false and breaking ES5 PropertyDescriptor >> system, so I created template, but not implemented it. >> https://github.com/Constellation/iv/commit/7cbc22474ada389a3ac8ab5d3ad5df38bed8a583 >> >> >> >> see http://wiki.ecmascript.org/doku.php?id=harmony:regexp_match_web_reality >> >> > _______________________________________________ > es-discuss mailing list > es-discuss@mozilla.org > https://mail.mozilla.org/listinfo/es-discuss > _______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss