in reply to Re: GREP Question: Filtering out third-party images with Privoxy
in thread GREP Question: Filtering out third-party images with Privoxy
@corion: It is Perl compatible, but I don't know if it loads Perl modules. Thanks for the link to jsUri. It seems way above my head, but I'll study it.
@Ken: Thanks for that, you've given me something to get me started. I should have been clearer, though. The requirement isn't as specific as the examples I gave. I want to be able to go to any website and strip out images that are not being served from the same domain as the page. So in the code you provided I would be looking for "google.com", the domain name, not "someimage". In addition, the domain name should be dynamically obtained somehow, not hardcoded. But to begin with, a hardcoded solution would do.
I think what you've provided can be used, I just need to figure out how to seek the domain, not the image name.
s/\s*<img.*src="[^"]*(?<!\/google\.com).*\.jpg".*>//gmWould that do it? (Apologies, it's been 10 years since I used GREP much.)
Thanks again,
Karl
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: GREP Question: Filtering out third-party images with Privoxy
by kcott (Archbishop) on Jan 22, 2014 at 14:15 UTC | |
by karld12 (Initiate) on Jan 24, 2014 at 10:14 UTC | |
by kcott (Archbishop) on Jan 24, 2014 at 11:02 UTC |