Escapes a string for use within RegExp
https://github.com/sindresorhus/escape-string-regexp
Escape special characters
const r = new RegExp(escapeString("(a-b)[.]"));const result = r.test("(a-b)[.]");console.log(result); // true
the escaped string
Generated using TypeDoc
Escapes a string for use within RegExp
See
https://github.com/sindresorhus/escape-string-regexp
Example
Escape special characters
Returns
the escaped string