Help with special filter

Tips on writing regular expressions for searching the post list

Moderators: Quade, dexter

Help with special filter

Postby Buzzy » Tue Nov 30, 2004 10:49 pm

I'm trying to filter OUT any subject and/or filename with any 1, 2 or 3 numbers enclosed in paranthesis. IE:

this (1).txt
that (123).htm
another(01).jpg

I can't figure out what it's supposed to look like. :?: I've tried both file and subject filters of

"("(0-9){2}")"\.*
"("(0-9)")"\.*
"("(0-9)(0-9)")"\.*

but the files still get thru. :evil:

Also, is there a limit to the number of filter "lines" you can have (ie: MOVIES has 100+ lines...what's the max limit?)

Heyalp!!!
Some days you're the dog .... some days you're the hydrant.
Buzzy
n00b
n00b
 
Posts: 6
Joined: Sun May 02, 2004 11:14 am

Registered Newsbin User since: 02/16/04

Postby dexter » Tue Nov 30, 2004 11:40 pm

You have to escape the parenthesis with a backslash since they are used in regular expressions.

\([0-9]\) should find any single number inside parenthesis for example.

I wouldn't use file filters unless you have to. It leads to performance problems if there are lots of matches.

There isn't a set limit to the number of lines, it's more the total size of the filters. I think 100 lines is excessive and might cause problems.
User avatar
dexter
Site Admin
Site Admin
 
Posts: 9514
Joined: Fri May 18, 2001 3:50 pm
Location: Northern Virginia, US

Registered Newsbin User since: 10/24/97

Postby Quade » Wed Dec 01, 2004 1:24 pm

Maybe try "\([0-9]+\)"
User avatar
Quade
Eternal n00b
Eternal n00b
 
Posts: 44981
Joined: Sat May 19, 2001 12:41 am
Location: Virginia, US

Registered Newsbin User since: 10/24/97

Postby Smite » Thu Dec 02, 2004 3:11 am

does \(\d{1,3}\) work?

I can't recall if the new RegEx parser does that properly...
Please read the FAQ before asking any questions.
If you're new to newsgroups, and the files on them, you can find a very helpful guide here.
User avatar
Smite
Katamari Damacy Addict
 
Posts: 5318
Joined: Sat May 19, 2001 1:54 am
Location: Alberta, Canada

Registered Newsbin User since: 03/27/03


Return to Regular Expressions

Who is online

Users browsing this forum: No registered users and 1 guest