2 Escape RegExp special characters.
4 You can also use this to escape a string that is inserted into the middle of a regex, for example, into a character class.
8 import escapeStringRegexp = require('escape-string-regexp');
10 const escapedString = escapeStringRegexp('How much $ for a 🦄?');
11 //=> 'How much \\$ for a 🦄\\?'
13 new RegExp(escapedString);
16 declare const escapeStringRegexp: (string: string) => string;
18 export = escapeStringRegexp;