Great patch, and great fix, showing how proper escaping is now built in to the web platform. Also see the follow-up tweet about how this is only really possible due to recent web standards work.https://twitter.com/mathias/status/1095423787825283072 …
-
-
Would love regex`...`
-
Would love if it validated positions with interpolation of regexps too... regex`${/h/i}ello ${'world'}` working regex`( grouped ${')'} ` doesn't close the grouping regex`(?<${name}>\w+)` ???
- 4 more replies
New conversation -
-
-
I’d additionally want String.prototype.replaceAll(str, funcOrStr) (AFAICT, the most frequent use case for RegExp.escape().
-
Maybe we should pick that up again: https://github.com/tc39/proposal-string-replace-all … I was put off by the committee’s desire to match replace() semantics (including all of its warts). But then again, maybe that’s a cost worth paying just to get global string → string replacement… +
@hooraybuffer@schuay - 2 more replies
New conversation -
-
-
That was my immediate thought as well.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
JavaScript, HTML, CSS, HTTP, performance, security, Bash, Unicode, i18n, macOS.
