Title |
Test
Find
Pattern Title
|
Expression |
(?<=^|[\s ]+)[^\!\@\%\$\s ]*([\!\@\%\$][^\!\@\%\$\s ]*){2,}(?=[\s ]+|$) |
Description |
That pattern will filter for words that contain more than 1 instance of any of the following characters: ! $ % @.
May be useful in filtering for spam.
Requires lookahead and lookbehind support in the underlying regex engine. |
Matches |
f%c$ | v!@gra | v@gr@ |
Non-Matches |
f%ck | viagra |
Author |
Rating:
Not yet rated.
Darren Neimke
|
Source |
|
Your Rating |
|
Title: Redefining boundaries and lexing through a target string.
Name: Darren Neimke
Date: 3/8/2004 2:11:42 PM
Comment:
I've written about some of the more interesting parts of this expression here:
http://blogs.regexadvice.com/dneimke/archive/2004/03/09/722.aspx