Questions regarding ES6 Unicode regular expressions
mathias at qiwi.be
Tue Aug 26 01:26:55 PDT 2014
On 26 Aug 2014, at 02:16, Norbert Lindenberg <ecmascript at lindenbergsoftware.com> wrote:
Thanks for confirming. Sounds like my “ES6 Unicode regular expressions to ES5” transpiler is working correctly, then: https://github.com/mathiasbynens/regexpu Demo: http://mothereff.in/regexpu (Bug reports welcome.)
> On Aug 25, 2014, at 1:59 , Mathias Bynens <mathias at qiwi.be> wrote:
>> Norbert’s original proposal for the `u` flag (http://norbertlindenberg.com/2012/05/ecmascript-supplementary-characters/#RegExp) mentioned the following:
>>> Possibly the definition of the character classes `\d\D\w\W\b\B` is extended to their Unicode extensions, such as all characters in the Unicode category “Number, decimal” for `\d`, as proposed by Steven Levithan. Whether this can be done under the same flag or requires a different one still needs discussion.
>> Has this been discussed any further? (I couldn’t find any mention of it in the meeting notes repository.) Should I file a bug?
> The “needs discussion” part actually came from the March 2012 TC39 meeting:
> We subsequently had some discussions about how to go about such a discussion, which petered out because no regular expression expert was available to work with.
> I suspect this issue needs a proposal rather than a bug.
https://github.com/mathiasbynens/es6-unicode-character-class-escape-sets#readme I’m fairly confident in the proposals for `\d` and `\w`, but `\b` needs work.
@Steven Levithan, would you mind lending your expertise on this? This is your chance to make `/na\b/u.test('naïve')` return `false` :)
More information about the es-discuss