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
Extended regular expression doesn't have positive look-ahead feature. See the regex flavor comparison