1private boolean isValidMail(String email) {
2
3 String EMAIL_STRING = "^[_A-Za-z0-9-\\+]+(\\.[_A-Za-z0-9-]+)*@"
4 + "[A-Za-z0-9-]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$";
5
6 return Pattern.compile(EMAIL_STRING).matcher(email).matches();
7
8}