RegEx Sporge Filters?

Tips on writing regular expressions for searching the post list

Moderators: Quade, dexter

RegEx Sporge Filters?

Postby adamlau » Fri Oct 13, 2006 5:08 am

What are some good, useful examples that can be implemented in NB?
User avatar
adamlau
Occasional Contributor
Occasional Contributor
 
Posts: 40
Joined: Fri Oct 13, 2006 2:58 am
Location: SoCal-SGV

Registered Newsbin User since: 10/28/06

Postby bobkoure » Sun Oct 15, 2006 12:04 pm

How does the sporge you're trying to winnow out differ from the real posts?
If it's some leading characters - that's easy.
For example, if you'd like to identify posts that start with !!!, ! ! !, ***, etc, you can use
^([!?*]\s*){2,6}
The characters in the square brackets determine the kinds of leading chars to be found, "\s*" means possibly followed by any amount of white space" and the numbers in the braces are the min/max number of repetitions of the pattern (only min really matters if you're going to put this in a reject filter).
bobkoure
 


Return to Regular Expressions

Who is online

Users browsing this forum: No registered users and 3 guests