clonetrooper9494 Posted November 30, 2007 Share Posted November 30, 2007 I have an email validation preg_match() script...If you know preg_match() pretty well, have a look at my code: /^(.+)(@)(.+)(.)[\.\](.+)$/ In other words, from the start of a value: look for 'wildcard' at least once (username of email address) , then look for @, then look for 'wildcard' at least once (domain name) , then look for a period ('.'), then look for 'wildcard' at least once (com, net ect.... still working on it, I know!)Question: how do you insert a period if in the code it's a wild card? Link to comment Share on other sites More sharing options...
Synook Posted December 1, 2007 Share Posted December 1, 2007 You can escape it, like you did. Though you don't need that \ after it - this might work /^(.+?)@(.+?)\.(.+?)$/ Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.