Page 1 of 1

RegEx Sporge Filters?

PostPosted: Fri Oct 13, 2006 5:08 am
by adamlau
What are some good, useful examples that can be implemented in NB?

PostPosted: Sun Oct 15, 2006 12:04 pm
by bobkoure
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).