Solved

email validation Regex Validation Expression

Posted on 2013-05-15
4
420 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

Find out what you should include to make the best professional email signature for your organization.
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
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 …
Suggested Courses

623 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