- or download this
s/\s*<img.*src="[^"]*(?<!\/someimage)\.jpg".*>//gm
- or download this
s/\s*<img.*src="http:\/\/(?!images\.google\.com\/)[^>]+>//gm
- or download this
#!/usr/bin/env perl
...
print "Modified markup:\n";
print $html_fragment;
- or download this
Initial markup:
<img src="http://images.google.com/someimage.jpg" />
...
<img src="http://anythingelse.com/etc.jpg" />
Modified markup:
<img src="http://images.google.com/someimage.jpg" />
- or download this
#!/usr/bin/env perl
...
print "Modified markup:\n";
print $html_fragment;
- or download this
Initial markup:
<img src="http://images.google.com/someimage.jpg" />
...
Modified markup:
<img src="http://images.google.com/someimage.jpg" />
<img src="http://images.google.com/NOTsomeimage.jpg" />