The ugly world of web reality...

Actually, in V8, Firefox, Safari, and IE, /[\u{10000}]/ seems to be the same as 
/[\\u01{}]/ - it matches "\\u01{}u01". In Opera, it doesn't seem to match 
anything, but doesn't throw the specified SyntaxError either.

Do we know of any applications actually relying on these bugs, seeing that 
browsers don't agree on them?

For string literals, I see that most implementations correctly throw a 
SyntaxError when given "\u{10}". The exception here is V8.

Norbert


On Mar 26, 2012, at 12:38 , Erik Corry wrote:

> 2012/3/26 Steven Levithan <[email protected]>:
>> Python uses the same syntax in regular expressions. But, as Norbert noted,
>> there is already a strawman for \u{X..}. If it were adopted, I think it is
>> clear that it should also be extended to RegExp literals. Of course, this
>> adds some complication when referencing numbers above FFFF unless /u is made
>> the default everywhere, since it implies code-point-based matching. E.g.,
>> what does /[^\0-\uFFFF\u{10000}]/ without /u match?
> 
> Without the /u flag it should behave exactly as it has done until now,
> for reasons of backwards
> compatibility.  On V8 that means that
> 
> /[\u{10000}]/
> 
> is the same as
> 
> /[u01{}]/
> 
> -- 
> Erik Corry

_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to