grep: PCRE does not support \L, \l, \N{name}, \U, or \u
001、grep命令报错如下
[root@PC1 test]# echo "你好世界" | grep -P '[\u4e00-\u9fff]+' grep: PCRE does not support \L, \l, \N{name}, \U, or \u
002、解决方法(把U改为x;同时中间用中括号):
[root@PC1 test]# echo "你好世界" | grep -P '[\x{4e00}-\x{9fff}]+' 你好世界
。
reference:
01、https://www.cnblogs.com/gyfluck/p/11690638.html