如果您的文件包含
apples are good
apple cider is also good
为什么会
egrep '(?=apples)app' file
无法接听任何线路?在 MAC 上使用 egrep 2.5.1
最佳答案
扩展正则表达式没有积极的前瞻功能。
见 the regex flavor comparison
关于regex - 使用正则表达式前瞻,egrep,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10645542/