grep command with a lookahead pattern does not select anything
问题 I was trying to use the following grep command: grep '(.*)(?=(png|html|jpg|js|css)(?:\s*))(png|html|jpg|js|css.*\s)' file File contains the following: http://manage.bostonglobe.com/GiftTheGlobe/LandingPage.html https://manage.bostonglobe.com/cs/mc/login.aspx?p1=BGFooter https://www.bostonglobe.com/bgcs /newsletters?p1=BGFooter_Newsletters https://bostonglobe.custhelp.com/app/home?p1=BGFooter https://bostonglobe.custhelp.com/app/answers/list?p1=BGFooter /tools/help/stafflist?p1=BGFooter https: