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

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -