Solved

email validation Regex Validation Expression

Posted on 2013-05-15
4
415 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
Comment Utility
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
Comment Utility
You could set the input type to "email" and let the browser do the work.

Cd&
0
 
LVL 84

Expert Comment

by:ozo
Comment Utility
0
 
LVL 18

Accepted Solution

by:
nap0leon earned 500 total points
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

763 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

7 Experts available now in Live!

Get 1:1 Help Now