im trying to make a match of the following criteria: "match any html reference as long as the reference itself does not contain the string lookaround" so ive tried with 50 different variations of negative lookahead but apparently cant figure out how to use it in a search.
sample file lines : src="Lookahead_Lookhere.gif" src="Lookahead_lookinside.html"; href="aa1.gif" src="Lookahea_LOOKAROUND_whatever.gif" stuff src="Lookahead_.gif "; should match: src="Lookahead_Lookhere.gif" src="Lookahead_lookinside.html" href="aa1.gif" src="Lookahead_.gif # current non-working regexp : while (<FILE>) { while (/(\w+=\".+?(?!lookaround)\.[a-z]+\")/ig) { print $1 , "\n" } } thanks allan