mirror of https://github.com/webpack/webpack.git
4 lines
143 B
JavaScript
4 lines
143 B
JavaScript
|
module.exports = function regexEscape(string) {
|
||
|
return string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string
|
||
|
};
|