[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[leafnode-list] Re: negating filters ?



On Tue, 11 Jul 2006, o00o wrote:

> Hi ppl !
> 
> 
> im a lil confused about leafnode filters

31337–5p33c4 ("elite"-speech) is not desirable on this list.
Please remember that not everybody here speaks English as native
language or is able to communicate at a level adequate for that.

So please spell out the words in full, capitalize as appropriate, do not
use slang-like contractions such as "wanna" and use proper punctuation
(apostrophe, full stop and thereabouts) - short, write proper English.
It doesn't have to be flawless, but it mustn't be deliberately mutilated either.

> the goal i wanna achive is to just fetch articles with 3 or 4 different subjects.
> 
> i tried something like this:
> 
> ! (^Subject:.*[eE][xX][aM][pP][lL][eE])
> 
> but it didnt work.

Did you consult the documentation or did you guess?
I suppose the latter...

Check the pcrepattern manual page, you probably need a negative
lookahead assertion such as

^(?i)Subject: (?!example)

Where the (?i) switches the remainder to case insensitive matching
and so the line would filter out

sUbJeCt: blAh

but allow

Subject: exaMPLe

Note this is entirely untested, no guarantees.

> also i dont know would it work to place just the inverted filter so
> that leafnod drops all the others or would it be necessary to add more
> filters.

Leafnode drops the message if at least one filter line matches the
message, so everything goes on one filter line which must not match any
of the subjects you want to see:

(?i)^Subject: (?!(Re:\s+)?(example|foo|bar))

would allow postings whose subject lines start with example, foo or bar,
possibly preceded by Re: and at least one space, and drop articles with
other subject lines.

HTH,

-- 
Matthias Andree
-- 
_______________________________________________
leafnode-list mailing list
leafnode-list@xxxxxxxxxxxxxxxxxxxxxxxxxxxx
https://www.dt.e-technik.uni-dortmund.de/mailman/listinfo/leafnode-list
http://leafnode.sourceforge.net/