在使用grep -P,出现如下报错:

grep: this version of PCRE is compiled without UTF support

原因

有些系统支持的正则规范不同。

解决办法

使用egrep或grep –E 代替。

正则表达式分类

  • 基本正则表达式:BRE

    grep ,egrep –G

  • 扩展正则表达式:ERE

    grep -E, egrep

扩展正则表达式extended regular expression比基本正则表达式basic regular expression的表达更规范。

参考

https://www.cnblogs.com/python-gm/p/6940756.html

相关文章:

  • 2021-09-14
  • 2022-12-23
  • 2022-01-21
  • 2022-12-23
  • 2021-06-01
  • 2021-07-03
  • 2022-12-23
  • 2021-09-21
猜你喜欢
  • 2021-08-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案