RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

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
Bad Good

Enter New Comment

Title
 
Name
 
Comment
 
Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

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


Copyright © 2001-2018, RegexAdvice.com | ASP.NET Tutorials