Post your filters!

Tips on writing regular expressions for searching the post list

Moderators: Quade, dexter

Post your filters!

Postby adept1 » Thu Apr 11, 2002 1:19 am

LAST EDITED ON 04-11-02 AT 00:27 AM (EST) Here are the ones I'm using right now:

DENY

Matches subjects that begin and end with at least two of certain special characters (example: ***Free llama pron***).
[!~*@#$^][!~*@#$^].*[!~*@#$^][!~*@#$^]$

ACCEPT

Matches multi-part ace, rar, par, hjsplit. (example: a01, a02, c01, c02, p01, p02, r01, r02, s01, s02, 001, 002, etc.)
\.[acprs-z0-9][a0-9][r0-9]

Matches various filetypes.
\.[avi]|[csv]|[jpg]|[mov]|[mp3]|[mpg]|[nfo]|[par]|[rev]|[sfv]|[wmv]|[zip]
adept1
 

RE: Post your filters!

Postby dexter » Thu Apr 11, 2002 10:34 am

LAST EDITED ON 04-11-02 AT 09:38 AM (EST) Nice, thanks!

How about this for the llama stuff:

^([!~*@#$^][!~*@#$^])+.*([!~*@#$^][!~*@#$^])+$

I think it is actually more effective if you remove the beginning and ending markers (or at least the end one) because usually there is a filename at the end of the subject line in the case of spam posts.

Also, for the extension matches, you should use parens instead of square brackets. The square brackets match one of the characters of the set, not the entire string defined inside the brackets. So it would be:

\.(avi)|(csv)|(jpg)|(mov)|(mp3)|(mpg)|(nfo)|(par)|(rev)|(sfv)|(wmv)|(zip)
User avatar
dexter
Site Admin
Site Admin
 
Posts: 9511
Joined: Fri May 18, 2001 3:50 pm
Location: Northern Virginia, US

Registered Newsbin User since: 10/24/97

RE: Post your filters!

Postby adept1 » Thu Apr 11, 2002 9:46 pm

LAST EDITED ON 04-11-02 AT 08:54 PM (EST) Thanks for the advice! I'll try your modifications and let you know how it goes.

Update: Hmm... Newsbinpro won't allow my to add this for some reason. Somebody else please try it.


\.(avi)|(csv)|(jpg)|(mov)|(mp3)|(mpg)|(nfo)|(par)|(rev)|(sfv)|(wmv)|(zip)

I even tried manually editing the filters file, but when NBP loads it seems to ignore this particular filter.
adept1
 

RE: Post your filters!

Postby boogeeman » Sun Jun 09, 2002 12:01 am

(-.*\.((RAR)|(PAR)|(NFO)|(SFV)|([R-Z][0-9][0-9])|([0-9][0-9][0-9])))|\([0]+/[0-9]+\)

finds rar sets including most support files and the 0/n file
boogeeman
Occasional Contributor
Occasional Contributor
 
Posts: 20
Joined: Fri Jun 07, 2002 5:56 pm

RE: Post your filters!

Postby PhileMonger » Thu Sep 12, 2002 6:01 am

its too long. cut it into 2 filters
PhileMonger
 


Return to Regular Expressions

Who is online

Users browsing this forum: No registered users and 2 guests