No such thing as a small change | |
PerlMonks |
Re^2: regex problemby ExReg (Priest) |
on Nov 03, 2015 at 23:36 UTC ( [id://1146857]=note: print w/replies, xml ) | Need Help?? |
If indeed you are looking for .jpg files under http://b.thumbs.redditmedia.com/ that do not have png in their names, it might be easiest to just get rid of your lookaheads and lookbehinds my @urls=$response_body =~ m{(http://b.thumbs.redditmedia.com/.+?\.jpg)}gi;and then add another line to get rid of the lines in the just created @urls that have png in them. Writing regexes that must match one thing but cannot match another are prone to caveats or are not blazingly intuitive.
In Section
Seekers of Perl Wisdom
|
|