Closed GoogleCodeExporter closed 9 years ago
Ok I will check that but it's seems to me that underscore are allowed and
worked when I tested it, so can you give me the email address that doesn't
match.
The part of regex that verify email is :
[\da-zA-Z\._\-]{1,50}@[a-zA-Z\d\-]{1,20}\.[a-zA-Z]{1,10}
It should works with underscore.
It does not match with all address because, you know... the real one is
apparantly something like that :
(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x0
8\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:
(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25
[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?
|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x
09\x0b\x0c\x0e-\x7f])+)\])
but I can make some improvement if you like.
Original comment by stephane...@gmail.com
on 10 Feb 2011 at 9:30
Ok, so there weren't a problem with underscore but with the multiple "." after
the "@".
ex : test@test.test.gmail.com
the regex for email is now :
[\da-zA-Z\._\-]{1,50}@([a-zA-Z\d\-]{1,20}\.)+[a-zA-Z]{1,10}
Original comment by stephane...@gmail.com
on 10 Feb 2011 at 9:55
Original issue reported on code.google.com by
daniel.l...@gmail.com
on 10 Feb 2011 at 8:30