hi .. i am facing a problem with a email validation,i wrote a code for checkin whether the email entered is valid or not,rest all is fine but is takes if i give a email as a@b.com.com,while it shud not take the 2nd "com",it takes the enteries w/o any exceptions... suggest sum methods so tht i can rectify this error.. thanks in advance.......
hi ......... i used the code u mentioned but still there is no change, it still accepts a@b.com.com as a valid email id. isnt there any way 2 set it in such a way tht it accepts only email id with one com in its domain? thanks
Originally posted by Eric Pascarello: The reg exp I usuaully use is
var StrRE = /^[\w.]{1,}[@]\w{1,}[.][\w.]{2,}$/;
Hi Eric, As per this expression, the character "-" is invalid in a email field. What change should I make to the above regular expression to make "-" (or any other character for that matter) as a valid character?