On Feb 8, 2011, at 3:35 PM, André Bargull wrote:
> On 2/8/2011 11:41 PM, Allen Wirfs-Brock wrote:
>> see below
>> On Feb 8, 2011, at 2:01 PM, Mark S. Miller wrote:
>>
>>> Does anyone know of any other syntax that all major JS engines accept
>>> that are not in the official ES5.1 grammar?
>>
>> Yes, various RegExp syntax discrepancies are know to exist. Somebody
>> needs to catalog them.
>>
>
> Especially the discrepancies which are visible when executing the few RegExp
> examples from the ES3/ES5 specification are quite amusing.
>
>
> "A<B>bold</B>and<CODE>coded</CODE>".split(new RegExp("<(/)?([^<>]+)>"))
> => Wrong result in Firefox/IE
Firefox 4 beta-recent agrees with Safari and Chrome, FYI.
/be
>
> "ab".split(new RegExp("a*"))
> => Wrong result in IE
>
> new RegExp("((a)|(ab))((c)|(bc))").exec("abc")
> => Wrong result in IE
>
> new RegExp("(z)((a+)?(b+)?(c))*").exec("zaacbbbcac")
> => Wrong result in Safari/IE
>
> new RegExp("(.*?)a(?!(a+)b\\2c)\\2(.*)").exec("baaabaac")
> => Wrong result in Safari/IE
>
> (Tested with current IE, Firefox, Safari, Opera)
> _______________________________________________
> es-discuss mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/es-discuss
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss