very complex regular expression request:
using privoxy 3.0.16 on Debian 6.0.10, Kernel 2.6.32-5-amd64
(yes I know its old)
I'd like a very complex regex that would kill facebook/twitter/etc menu BARS.
(yes I know this is hard)
It should match any div..../div recursively**n containing exactly ONE other div../div
OR terminus of multiple divs all containing facebook/twitter/linkedin/otherSocialMedia references (each containing no additional divs)
pseudo regex might be /(divpairRecursive | ^socialMediaRefdiv+$)/
I think this would catch nearly ALL the social media bars that I've seen. A user could then add arbitrary additional social media refs as they get invented.
Anybody want to try to tackle this insane regex? (or is it only me that's insane?)
I think you'll need a proper programming language for this.
Incidentally Privoxy 3.0.22 (unreleased but available through CVS) has an +external-filter{} action.
Hi Bit Paranoid, After a long time be a friend with Privoxy, I figured that I simple filter is better, with your needs, I think we just need to remove all social domain from other site but leave social official site alone, I also have a small filter and run all the time that I want to share with you:
FILTER: socialbutton
s@(?:.twitter.com|apis.google.com\/js|.facebook.|.sharethis.|.facebook.|google-analytics.)@@giT
{+filter{socialbutton}}
/
{-filter{socialbutton}}
.facebook.
.google.
.twitter.