Copyright © 2005-2008 Andrea Tincani

AndreaPHP | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (Cookie How to)Next Topic (goto command) New Topic New Poll Post Reply
AndreaPHP Forum : PHP General : Regular Expression for validating email addresses
Poster Message
ross96
Level: Protégé

Registered: 01-09-2005
Posts: 8

icon Regular Expression for validating email addresses

I'm using the following regular expression:

'/^[^@\s]+@([-a-z0-9]+\.)[a-z]{2,}$/i'

to validate email addresses in a webform. It works really well with addresses such as "name@example.com", but it wont work with domain extensions with more than one "dot" at the end, such as, " name@example.co.uk".

Can anyone let me know a regular expression that will allow more universal email addresses through the net?

Thanks very much in advance, I really appreciate your help.

05-09-2005 at 06:23 AM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaPHP Forum : PHP General : Regular Expression for validating email addresses
Previous Topic (Cookie How to)Next Topic (goto command) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: AndreaVB

Copyright © 2005-2008 Andrea Tincani

Powered by: tForum tForum Edition b0.92p1
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team.