Author: itsurday | Posted on: 7/18/2008 7:44:52 AM | Views : 418

 I am trying to validate email addresses separated by ',' using regular expression
 
^ # anchor at the start
([0-9a-zA-Z]([-.'\w]*[0-9a-zA-Z_])*@([0-9a-zA-Z][-\w]*\.)+[a-zA-Z]{2,9})
(\s*,?\s*
[0-9a-zA-Z] # first charecter is not a special charecter
([-.'\w]*[0-9a-zA-Z_])* # a word not ending with spl charecter
@ # @ charecter
([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+ # subdomain and domain names ending with a dot
[a-zA-Z]{2,9} # ending of domain name
)*\s*
$ # anchor at the end 
its validating almost of the email I have tested but errors out while testing 'something@a.com'  
Did I mess anything?


 
...

Go to the complete details ...