Comment Comment by phpnode There's a proposal for RegExp.escape() which was rejected by TC39 for imho quite silly reasons: https://github.com/benjamingr/RegExp.escape/issues/37 parent phpnode 6 years ago