I am scanning through some html, but my basic regex is being tripped up by .jpeg files, which I would like to exclude. I've added a lookahead clause which has helped, but I would like to add an additional lookbehind clause, which is causing the entire regex to fail.
Code: Select all
preg_match_all(",..basic regex..(?!.*\.jpg"),",$html, $all_matches); // THIS LOOKAHEAD WORKS
Code: Select all
preg_match_all(",..basic regex..(?!.*\.jpg")(?<!.*\.jpg)",$html, $all_matches); // THIS LOOKAHEAD AND LOOKBEHIND DOES NOT WORK
Thanks in advance,
KC