Hi ,
I am using this code for email validation. the only problem with this is its taking space like as i have shown in exp code.
can any one help me to fix this bug.
String emailString = "aa
hello@abv.com";
boolean isValidEMail = false;
String emailRegEx ="^([_a-z0-9-]+(.[_a-z0-9-]+)*@[a-z0-9-]+(.[a-z0-9-]+)*.(([a-z]{2,3})|(aero|coop|info|museum)))?$";
Pattern pattern = Pattern.compile(emailRegEx);
Matcher matcher = pattern.matcher(emailString);
isValidEMail = matcher.find();
System.out.println("email result : "+isValidEMail);
email result : true
Regards ,
Mannu Pal.