Solved

email validation Regex Validation Expression

Posted on 2013-05-15
4
416 Views
Last Modified: 2013-05-16
Hi I have an email address that is not passing my regex validation.
anyone know the correct syntax to deal with
aaa.bbb-@aaa.co.uk it's the dash that is casing the issue

I currently have tried

^([0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*@(([0-9a-zA-Z])+([-\w]*[0-9a-zA-Z])*\.)+[a-zA-Z]{2,9})$


^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$
0
Comment
Question by:Simon Cripps
4 Comments
 
LVL 82

Expert Comment

by:leakim971
ID: 39168772
Open this link in your browser (or a text editor) : http://ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.js

search for : Plugins/Validation/Methods/email
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 39168889
You could set the input type to "email" and let the browser do the work.

Cd&
0
 
LVL 84

Expert Comment

by:ozo
ID: 39169134
0
 
LVL 18

Accepted Solution

by:
nap0leon earned 500 total points
ID: 39169475
Try this function from when I asked the question a couple years ago.  Used this function on a Fortune 500's eCommerce site for a number of years without any hiccups.

http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_24417659.html
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now