_.escapeRegExp([string=''])
转义RegExp
中特殊的字符 "^", "$", "", ".", "*", "+", "?", "(", ")", "[", "]", "{", "}", 以及 "|"。
_.escapeRegExp('[lodash](https://lodash.com/)');
// => '[lodash](https://lodash.com/)'
转义RegExp
中特殊的字符 "^", "$", "", ".", "*", "+", "?", "(", ")", "[", "]", "{", "}", 以及 "|"。
_.escapeRegExp('[lodash](https://lodash.com/)');
// => '[lodash](https://lodash.com/)'