Page 1 of 1

Regex to filter all headers except those that contain a word

PostPosted: Thu May 26, 2005 7:36 pm
by RonMarz
How would I write an expression to filter out all headers except those containing the term "public domain?"

I assume this requires some use of both the Accept and Reject filters, but I haven't correctly doped out the syntax.

Thanks.

PostPosted: Thu May 26, 2005 9:25 pm
by Quade
You add an accept filter only.

"public.*domain" is how I'd do it. No quotes.

PostPosted: Thu May 26, 2005 9:48 pm
by RonMarz
And that causes all other headers to be rejected? I'll give it a try. (Boy, did I have the wrong idea.)

PostPosted: Thu May 26, 2005 10:08 pm
by itimpi
In this case I would expect a Reject filter, not an accept filter.

PostPosted: Thu May 26, 2005 10:34 pm
by Quade
Think of it this way.

Accept means "Show ONLY matching"

Whereas

Reject means "Reject ANY Matching".

If you ONLY want to see "Public Domain" then only Accept "Public.*Domain". Should only show you matches.

PostPosted: Thu May 26, 2005 10:53 pm
by RonMarz
All clear now. (I thought Accept meant "OVERRIDE Reject with matching.") Thanks.

PostPosted: Sat Jul 22, 2006 6:32 pm
by bobkoure
Just a nit, but wouldn't you actually want "public\s*domain"?
Not that you are going to get a lot of posts with "public blah blah blah domain blah blah" in 'em...
I'm assuming a title with "publicdomain" should be matched (as did you with the .*).