Status: Accepted
Owner: [email protected]
CC: [email protected]
Labels: Type-Bug Priority-Medium

New issue 3756 by [email protected]: Regexps: \u as identity escape behaves differently depending on whether it's at the end of the regexp or not
https://code.google.com/p/v8/issues/detail?id=3756

According to the ES5 spec, "\u" which is not followed by 4 hex digits is treated as an identity escape, so it should be treated as "u".

1)

d8> var r0 = /\u/
undefined
d8> r0.test("u")
false <<< HUH?

2) Other identity escapes work as expected:

d8> var r1 = /\a/
undefined
d8> r1.test("a")
true

3) \u also works as expected if it's not at the end

d8> var r2 = /foo\ubar/
undefined
d8> r2.test("fooubar")
true

4) And for additional WTF:

d8> var r3 = /foo\u/
undefined
d8> r3.test("foou")
false
d8> r3.test("foo\\u")
true <<< WUT?
d8> r2.test("foo\\ubar")
false << This is as expected (see r2 above)



--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to