Simple regular expression for a spam filter

I need a regular expression for a spam filter. Basically, I’m receiving particularly annoying spam from varying address, but with pretty characteristic title content, and I could reject emails based on this title pattern.

The titles are in the form of:

GreatAdobbeAndCoorelDdeals-BuyWith70%DicosuntAndStartDownlaoadingRightAway
Hi-SpeedAnddHhassle-FreeDowwnloadOfAllMacAndPPCSotwfare
NewOfifice2010IsGgeraterThhanEveer.OrdeerItFrommLeaidngOnilneResseller
GreatDealsOnMuisicBBruinng&EdtiingSofftwaare-SaaveUpTo70%.FamuousSoftwarreOuutletSince2002
LoooikinngForGenuniuneDiscouunttedSoofttware?HereIsTheRightPlace

so it should pretty easy to crate a RegEx for them, but I have no experience in this area.

So, the RegEx should mach the following criteria:

-The string contains at least 50 characters (letters, digits, signs)
-The string does not contain space


Thanks
npaunAsked:
Who is Participating?
 
eugenbvCommented:
try .[^ ]{50,}
0
 
MacAnthonyCommented:
Try this:
if( preg_match('/^[^ ]{50,}$/i',$title) == 1 )
     // do something

Open in new window

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.