java - Email validation using Regular expression -
this question has answer here:
i didnot find kind of type of email id can please tell me how validate below email using regular expression email id - xyzabc@co.xyz-gordo.in.zs
i using below pattern
^[_a-za-z0-9-\\+]+(\\.[_a-za-z0-9-]+)*@"+ "[a-za-z0-9-]+(\\.[a-za-z0-9]+)*(\\.[a-za-z]{2,})$
for email validation use apache commons email validator. simple use , don't need invent wheel ;-)
Comments
Post a Comment