Fwd: Questions regarding ES6 Unicode regular expressions
till at tillschneidereit.net
Mon Aug 25 02:44:55 PDT 2014
(Forwarding to Norbert as I don't know how closely he follows es-discuss.)
---------- Forwarded message ----------
From: Mathias Bynens <mathias at qiwi.be>
Date: Mon, Aug 25, 2014 at 10:59 AM
Subject: Questions regarding ES6 Unicode regular expressions
To: es-discuss <es-discuss at mozilla.org>
Norbert’s original proposal for the `u` flag (
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?
Norbert also suggested replacing ‘characters’ with ‘code points’ in
when the `u` flag is set. It seems the intent was to make e.g. `/\d/u`
match `/[0-9]/`, and `/\D/u` match all Unicode code points except `[0-9]`.
This is different from `/\D/` which only matches BMP code points.
It seems like this change has not propagated to the spec draft, though. Is
this correct, and if so, what’s the reason for that?
The same goes for `/[^a]/u` – should this match all Unicode code points
except `a` or should it only match BMP code points?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss