Combining filters for multiple addresses

Posting here is no longer possible, please use the forum of a filter list project, such as EasyList
Locked
Guest

Combining filters for multiple addresses

Post by Guest »

Ares2 wrote:From the documentation:
Often you need to accept any separator character in a filter.[...]Separator character is anything but a letter, a digit, or one of the following: _ - . %
When looking at the available subscriptions and especially now that we have the new algorithm for the shortcuts that requires using non-alphanumeric delimiters, it could (not yet tested in terms of false-positives) make things a lot easier if there would be a separator that includes underscore, hyphen and dot. I guess % should remain except due to it's special meaning in html urls.

Example:

Code: Select all

/exampleads/*
/exampleads-
/exampleads.
_exampleads.
_exampleads_
?exampleads=
All of those structures are not theoretical, but pretty common all around. Also, looking at the subscriptions, you can find many examples of these "duplicates" proving that. Yet only the first and the last could be combined to ^exampleads^ currently, which limits the the real-world use to few rare situations (like ports in urls).

Therefore I'm suggestion either modifying ^ or introducing a more inclusive separator.
I believe I had the similar problem as him, but in a little different way. I have been trying to make a special filter for a site ( of a few elements to be blocked. ) I also believe that this will be much easier for me ( and for all of us ) to managing the multiple sites using it own lines, so once the site get updated with new elements, I can look down to my current filter, edit the line from there.

There's a few addresses on that web as an example ( It has nothing to do with against of site owner, it just that I need to learn how to create a proper filter that is already included in this APB ):

Code: Select all

http://www.mozilla.org
http://www.mozilla.org/images/template/dino.png
http://www.mozilla.org/images/template/background-paint.jpg
tp://ww.youtube.cm/LuLuLuL   < Fake.
I would like to understand how to combine these urls into a single line, by using the separators, but I'm having no lucks on that so far.

Code: Select all

@, @@ , |, ||, ^, ,(yes, comma.) , and using of &. 
I understand that there's a faq for it, but it wasn't clear enough for me to create one. I'm still stumped with this confusing instruction: http://adblockplus.org/en/filters#separator

I'm using:

Code: Select all

Mozilla Firefox 3.6.15 with APB 1.3.3 and NS 2.0.9.9
ESET SmartSecurity 4.0.474.0 running on 5970 (20110321), web security settings-normal.
Windows 7 Ultimate x64
Thank you, and looking forward to hear the answer :)

-Lucan

Edited: Tried @Wladimir Palant's suggestion, it's a no-go.
User avatar
Adblock Plus Fan
Posts: 1255
Joined: Sat Feb 24, 2007 11:08 am

Re: Combining filters for multiple addresses

Post by Adblock Plus Fan »

I'm afraid there are many things you have misunderstood.
Guest wrote:I would like to understand how to combine these urls into a single line, by using the separators, but I'm having no lucks on that so far.

Code: Select all

@, @@ , |, ||, ^, ,(yes, comma.) , and using of &. 
None of the above symbols have the purpose of combining many filters into one filter. They cannot be used in such a way, and Adblock Plus was not designed to operate in such a way.
Guest wrote:I understand that there's a faq for it, but it wasn't clear enough for me to create one. I'm still stumped with this confusing instruction: http://adblockplus.org/en/filters#separator
If you do not understand what is written, I would suggest you to ask more specific questions for clarification. Unless you actually expect anyone here to rewrite the entire FAQ for you :P
Guest wrote:There's a few addresses on that web as an example ( It has nothing to do with against of site owner, it just that I need to learn how to create a proper filter that is already included in this APB ):

Code: Select all

http://www.mozilla.org
http://www.mozilla.org/images/template/dino.png
http://www.mozilla.org/images/template/background-paint.jpg
tp://ww.youtube.cm/LuLuLuL   < Fake.
I don't think this makes a very good example for you to learn anything from. I recommend you to point out an example in which you point out which items should be blocked and which items should not be blocked.
LorenzoC

Re: Combining filters for multiple addresses

Post by LorenzoC »

BTW, in my understanding the way for combining filters in the past was regular expressions. Since ABP is not optimized for regular expression but for long list of simple keywords, there is actually no point in grouping filters, on the contrary, it would degrade ABP performance a lot.
Lucan

Re: Combining filters for multiple addresses

Post by Lucan »

Sorry for not getting back to this topic, I lost the bookmark to this site.

Guest wrote:There's a few addresses on that web as an example ( It has nothing to do with against of site owner, it just that I need to learn how to create a proper filter that is already included in this APB ):

Code: Select all

        http://www.mozilla.org
        http://www.mozilla.org/images/template/dino.png
        http://www.mozilla.org/images/template/background-paint.jpg
        tp://ww.youtube.cm/LuLuLuL   < Fake.
I don't think this makes a very good example for you to learn anything from. I recommend you to point out an example in which you point out which items should be blocked and which items should not be blocked.
No, what I meant is to have some elements to be blocked via ONE FILTER. The example in the above wasn't clear, so I'm sorry.

These elements in the above I would like to block using A LINE for the filter, instead of mulitple entries.... such as this

Code: Select all

||mozilla.org  @/images/template/*.* ;  @||youtube.com/LuLuLuL 
Ya catching my drift? I have too many ABP filters in my system and I'm wondering if it's possible to combine a entire filters for a site into a line?


p.s. aside of what Adblock Plus Fan said.... it's still unclear on what and how to use the filter commands in the FAQ.

Will someone being willing to describe what each command is used for and what it is supposed to be used with.

Code: Select all

@, @@ , |, ||, ^, ,(yes, comma.) , and using of &. 
Thank you,

Lucan
lewisje
Posts: 2743
Joined: Mon Jun 14, 2010 12:07 pm

Re: Combining filters for multiple addresses

Post by lewisje »

First of all, the only way for a single filter to be more efficient than a series of filters is for the single filter to encode less information about the set of objects to be filtered, which will inexorably lead to false positives or ads getting through; also, to find out what those symbols mean, read this: en/filters
There's a buzzin' in my brain I really can't explain; I think about it before they make me go to bed.
Lucan

Re: Combining filters for multiple addresses

Post by Lucan »

I'm still not satisfied with the answer, but I'm seeing that there's no option for keeping multiple filters in a line..

That's okay, it's a small thing.

Thanks for your help, and keep up with good work, APB.


This topic can be closed now.

Lucan
Locked