fry2010 Posted May 4, 2009 Share Posted May 4, 2009 I have an email preg_match() expression that im trying to include a '+' sign in, so that it allows this at the start before the @. '/^[^\x00-\x20()<>@,;:\\".[\]\x7f-\xff]+(?:\.\+[^\x00-\x20()<>@,;:\\".[\]\x7f-\xff]+)*\@[^\x00-\x20()<>@,;:\\".[\]\x7f-\xff]+(?:\.[^\x00-\x20()<>@,;:\\".[\]\x7f-\xff]+)+$/' Link to comment https://forums.phpfreaks.com/topic/156733-put-a-in-regex/ Share on other sites More sharing options...
nrg_alpha Posted May 4, 2009 Share Posted May 4, 2009 Using regex for emails gets pretty messy. I would recommend having a look this thread post (#3). There is a link to a full blown email parser that seems to do a respectable job at detecting email formats. Link to comment https://forums.phpfreaks.com/topic/156733-put-a-in-regex/#findComment-825320 Share on other sites More sharing options...
fry2010 Posted May 4, 2009 Author Share Posted May 4, 2009 thanks a lot, thats an interesting read. I dnt no whether to use that massive function, or to keep to some other simpler ones I have, but its good to know. Link to comment https://forums.phpfreaks.com/topic/156733-put-a-in-regex/#findComment-825337 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.