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 Link to comment https://forums.phpfreaks.com/topic/67446-filtering-out-email-addresses/ Share on other sites More sharing options...
dbo Posted August 31, 2007 Share Posted August 31, 2007 Sounds like a spammer to me! Link to comment https://forums.phpfreaks.com/topic/67446-filtering-out-email-addresses/#findComment-338565 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 Link to comment https://forums.phpfreaks.com/topic/67446-filtering-out-email-addresses/#findComment-338566 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.