
July 3rd, 2009, 02:00 PM
|
|
Developer Shed
|
|
Join Date: Jun 2007
Posts: 38,067
Time spent in forums: < 1 sec
Reputation Power: 43
|
|
|
Validate an email address using regular expressions
email address are the means of communication with people around the world. While processing forms email address validation plays an important. Proper email validation strengthen our contact list, ban spamming and protect us from robot form filling (Form AutoFill).
Here we are going to design a regular expression pattern to validate email address. which will check to make sure an e-mail address is a valid address, and in proper format means containing an username, at sign (@), and valid hostname. For example, admin@samplehost.com is valid, but SPAM@badhost is invalid. Most of email service provides limit the use of literals for email address creation. Only letters (a-z,A-Z), numbers (0-9), hyphens (-), underscore (_) and periods (.) are allowed and no special characters are accepted. You can add or remove any literals to your regular expression.
Read the full article here: Validate an email address using regular expressions
|