RegExp.escape()

Benjamin Gruenbaum benjamingr at gmail.com
Sat Jun 27 15:37:48 UTC 2015


I'd like to give https://github.com/benjamingr/RegExp.escape/issues/29
another week *please, if you have a strong opinion voice it* after which
we'll settle on a hopefully *final* API for RegExp.escape in terms of the
escaped parts.

Some parts so you won't have to read the whole thread (debated issues):

 - Numeric literals are escaped at the start of the string to not interfere
with capturing groups (yes/no)
 - Hex characters ([0-9a-f]) are escaped at the start of the string to not
interfere with unicode escape sequences (yes/no)
 - `/` is escaped to support passing a RegExp string to eval (yes/no)?

And so on.

On Sat, Jun 20, 2015 at 2:07 PM, Benjamin Gruenbaum <benjamingr at gmail.com>
wrote:

> As a cross-cutting concern I'd like the feedback of more people on
> https://github.com/benjamingr/RegExp.escape/issues/29
>
> Basically we've got to make a design choice of readable output vs.
> potentially safer output.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150627/b6de11de/attachment.html>


More information about the es-discuss mailing list