How to block ads effectively with AdBlock regular expressionsWed, Oct 26, 2005 in Web
Blocking content is a delicate dance. It’s very easy to block too much, so the patterns need to be fairly specific. The following patterns will match almost any content I don’t want to see on the Internet, and rarely block something I do want to see. Note that these are regular expressions.
To use it, join the entire list with | and start and end it with /. The following is everything together as a single regular expression. This is my one and only Adblock filter:
If you’re familiar with regular expressions, you will have realized some of the entries can be combined into one with grouping. Without taking this to extremes, here is the shorter version:
I don’t block
swf because the flashblock extension blocks Flash more conveniently than AdBlock, in my opinion.