Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

regular expression to validate an email address

Status
Not open for further replies.

gchaves

Programmer
Oct 27, 2003
105
US
I have a form where I am collecting a user's email address as part of the form. When submitted, an email will be sent to the user containing all of the information the user entered into the form based on the email address they entered. I am looking to use a regular expression to make sure they entered an "@" as well as one . before the @ and one . after the @. I am also looking to make sure that the address after the @ equals "abc.com". I am not sure how to write it, though...but I essentially need it to make sure the user types in something like "employee.name@abc.com" with "abc.com" being constant in every email address.

I am using some vbscript form validation ie. If request.form("email")="" Then Response.Write "you need to enter an email address."...(I suspect there may be a few less knowledgeable computer users in our office who may not know that they have Javascript disabled on their machine...hence the server-side validation.) Any help would be most graciously appreciated! If you need me to post my code, please let me know.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top