Alex Piotto
08-15-2002, 10:02 AM
Hi everybody!
I found the email validation routine below somewhere on the net, and seems to do the job very well... but ... if I try to validate an address like "alex21@yahoo.com" I get the alert from the second part of the script that the email address is invalid...
If I delete the 21 the email is ok.
the routine:
---------------------------
var emailregex = /^([a-z]+)([.,_,-]([0-9,a-z,A-Z]+))*@([a-z0-9]+)([.,_,-]([0-9,a-z,A-Z]+))*\.[a-z]{2,4}$/i
---------------------------
Why is this happening? How can I modify the routine?
Can somebody help me? I am just a beginner...
thanks
Alex :(
I found the email validation routine below somewhere on the net, and seems to do the job very well... but ... if I try to validate an address like "alex21@yahoo.com" I get the alert from the second part of the script that the email address is invalid...
If I delete the 21 the email is ok.
the routine:
---------------------------
var emailregex = /^([a-z]+)([.,_,-]([0-9,a-z,A-Z]+))*@([a-z0-9]+)([.,_,-]([0-9,a-z,A-Z]+))*\.[a-z]{2,4}$/i
---------------------------
Why is this happening? How can I modify the routine?
Can somebody help me? I am just a beginner...
thanks
Alex :(