Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个简单的问题,我只是想知道如何在 unix 终端的 grep 中使用前瞻和后备?我想知道如何打开 ?= 和 ?<= 等的特殊含义。
希望大家能给我一些建议。
提前谢谢了。:p
你需要grep -P,使用 PCRE。
grep -P
例如:
kent$ echo "David Dai"|grep -Po "(?<=v)i.*(?=D)" id