RegExp.escape()

Mathias Bynens mathiasb at opera.com
Tue Jun 30 07:35:26 UTC 2015


On Mon, Jun 29, 2015 at 9:04 PM, Benjamin Gruenbaum
<benjamingr at gmail.com> wrote:
> Why? What advantage would it offer?

See Scott’s previous email:

On Mon, Jun 29, 2015 at 8:42 PM, C. Scott Ananian <ecmascript at cscott.net> wrote:
> Imagine trying to ensure that any characters over \u007f were
> escaped.  You don't want an iterable over ~64k characters.
>
> In addition, a RegExp would allow you to concisely specify "hex digits, but
> only at the start of the string" and some of the other oddities we've
> considered.


More information about the es-discuss mailing list