nevynev Posted August 31, 2007 Share Posted August 31, 2007 I've successfully filtered out normal email addresses out of a string but I want to filter e.g.: email @ email.com email @ email .com email at email.com email#email.com and so on - how can I do this using regular expression so that it also doesnt mess up other normal input. Thanks NevyNev Quote Link to comment Share on other sites More sharing options...
dbo Posted August 31, 2007 Share Posted August 31, 2007 Sounds like a spammer to me! Quote Link to comment Share on other sites More sharing options...
MadTechie Posted August 31, 2007 Share Posted August 31, 2007 Filter out being remove.. so try this $data= preg_replace('/\b[A-Z0-9._%+-]+\s?(@|#|at)\s?[A-Z0-9.-]+\s?\.\s?[A-Z]{2,4}\b/si', '', $data); please note this is the wrong section, we have a regex section Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.