filename .rar & filename .exe

Tips on writing regular expressions for searching the post list

Moderators: Quade, dexter

filename .rar & filename .exe

Postby usenetaww » Wed Mar 04, 2009 9:34 am

Hi,

I see alot of posts with a space between . and rar, and . and exe. How do I filter out these?

Edit: I did mean between the filename and dot.extension. Thanks for the help! I edited the topic too.
Last edited by usenetaww on Wed Mar 04, 2009 10:14 am, edited 2 times in total.
usenetaww
Occasional Contributor
Occasional Contributor
 
Posts: 10
Joined: Wed Mar 04, 2009 9:32 am

Registered Newsbin User since: 02/18/09

Postby Quade » Wed Mar 04, 2009 10:02 am

[.]\srar
[.]\sexe

Are you sure? I've never seen any posts like this.

\s[.]rar
\s[.]exe

Is space before the extension dot
User avatar
Quade
Eternal n00b
Eternal n00b
 
Posts: 44972
Joined: Sat May 19, 2001 12:41 am
Location: Virginia, US

Registered Newsbin User since: 10/24/97

Postby usenetaww » Wed Mar 04, 2009 10:08 am

Quade wrote:[.]\srar
[.]\sexe

Are you sure? I've never seen any posts like this.

\s[.]rar
\s[.]exe

Is space before the extension dot


Thanks for answering. I got it wrong. There is a space between the filename and .rar or .exe.

I will use

\s[.]rar
\s[.]exe

then.

Thank you!
usenetaww
Occasional Contributor
Occasional Contributor
 
Posts: 10
Joined: Wed Mar 04, 2009 9:32 am

Registered Newsbin User since: 02/18/09

Postby Quade » Wed Mar 04, 2009 10:27 am

Yeah, put that in the subject and filename reject sections of the global filter to make it apply to all groups.

\s = space
[.] = literal dot
rar/exe actual pattern match.

So, it's saying "match any pattern that has space then dot, then RAR or EXE

You could also do it with a single RE

\s[.](rar|exe)

Which is probably more efficient.

You can test these in the "Find" box. It uses the same syntax.
User avatar
Quade
Eternal n00b
Eternal n00b
 
Posts: 44972
Joined: Sat May 19, 2001 12:41 am
Location: Virginia, US

Registered Newsbin User since: 10/24/97

Postby usenetaww » Wed Mar 04, 2009 1:17 pm

Thank you that worked great. Now it filters the bad files when I do Internet searches too :D
usenetaww
Occasional Contributor
Occasional Contributor
 
Posts: 10
Joined: Wed Mar 04, 2009 9:32 am

Registered Newsbin User since: 02/18/09

Holy cow...

Postby positron » Sat Mar 28, 2009 1:29 pm

Just choked a list from 465813 entries to 8744 by adding just this one filter.

:)

Thanks!
positron
Occasional Contributor
Occasional Contributor
 
Posts: 16
Joined: Tue Feb 20, 2007 3:19 am

Registered Newsbin User since: 05/01/03

Postby Quade » Sat Mar 28, 2009 1:55 pm

Nice. You know you can improve performance by using that in the "Find" box, Ctrl-A to select everything and then "Shift-Del" to simply delete them from disk.

Filters are good but, deleting the bad stuff will actually save disk space AND improve performance.
User avatar
Quade
Eternal n00b
Eternal n00b
 
Posts: 44972
Joined: Sat May 19, 2001 12:41 am
Location: Virginia, US

Registered Newsbin User since: 10/24/97


Return to Regular Expressions

Who is online

Users browsing this forum: No registered users and 2 guests