Block images that have certain words in the image name/path

Posting here is no longer possible, please use the forum of a filter list project, such as EasyList
Locked
xeoncross
Posts: 1
Joined: Tue Oct 21, 2008 9:42 pm

Block images that have certain words in the image name/path

Post by xeoncross »

I have looked around for this - but I can't seem to find anything on blocking images that contain a certain word.

For example, lets say I don't like pictures with apples in them. I don't know what sites might have apples - so I can't create rules off-hand. I also don't want to block every picture by hand.

So what would I need to do to block images that have the word "apples" in them?

Code: Select all

*apples*.jpg|.png
smk
Posts: 100
Joined: Mon Jul 14, 2008 6:54 am

Re:

Post by smk »

regexes are used like this:
/.*apples.*(\.jpg|\.png)/
. means match any single character
* means match it >=0 times
() means remember, or simply--what a bracket means: group things together
| means or, guess u already know that
regexes need to be in-between /.../

btw, a better & faster filter would be:
*apples*|$image
$image means to block an image

i suggest having a look at abp's & java regex's documentation
Locked