File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
A friendly place for programming greenhorns!
Big Moose Saloon
Search
|
Java FAQ
|
Recent Topics
Register / Login
Win a copy of
Arduino in Action
this week in the
General Computing
forum!
A special promo:
Enter your blog post or vote on a blogger to be featured in an upcoming Journal
JavaRanch
»
Java Forums
»
Engineering
»
HTML, CSS and JavaScript
Author
E-mail address validation
Vivek Puthiyonnan
Greenhorn
Joined: Jan 26, 2005
Posts: 18
posted
Dec 30, 2005 23:46:00
0
How can i validate email addresses using javascript ?
Vivek P
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35439
9
posted
Dec 31, 2005 01:52:00
0
Here's something age-old. I'm sure it can be improved (e.g., it doesn't handle internationalized domain names) but it should give you a start.
function checkEmail (name) { var email = name.toLowerCase(); // remove any white space email = email.replace(/\s/gi, ""); if (email.search(new RegExp("^\\S+@([-\\w]+\\.){1,4}[a-zA-Z]{2,6}$")) != 0) return false; return true; }
[ December 31, 2005: Message edited by: Ulf Dittmer ]
Android apps
–
ImageJ plugins
–
Java web charts
I agree. Here's the link:
http://aspose.com/file-tools
subject: E-mail address validation
Similar Threads
Axis Fault: connect:could be due to invalid address
String Validations
any logic to validate an email address
validate multiple email addresses in a textarea
Reg Exp for @www.webinspect.hp.com
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter