_.escapeRegExp([string=''])

转义RegExp 中特殊的字符 "^", "$", "\", ".", "*", "+", "?", "(", ")", "[", "]", "{", "}", 以及 "|"。

_.escapeRegExp('[lodash](https://lodash.com/)');
// => '\[lodash\]\(https://lodash\.com/\)'

 

相关文章:

  • 2021-07-11
  • 2022-01-21
  • 2022-01-20
  • 2022-12-23
  • 2021-11-06
  • 2021-07-12
猜你喜欢
  • 2022-12-23
  • 2021-07-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-11
  • 2021-08-06
相关资源
相似解决方案