问题
If your file contains
apples are good
apple cider is also good
Why would egrep '(?=apples)app' file fail to pick up any lines?
Using egrep 2.5.1 on MAC
回答1:
Extended regular expression doesn't have positive look-ahead feature. See the regex flavor comparison
来源:https://stackoverflow.com/questions/10645542/using-regex-lookahead-egrep