private static final String PATTERN_EMAIL = "^[_A-Za-z0-9-\\+]+(\\.[_A-Za-z0-9-]+)*@" + "[A-Za-z0-9-]+(\\.[A-Za-z0-9]+)*(\\.[A-Za-z]{2,})$"; public boolean validarCorreo(String email) { Pattern pattern = Pattern.compile(PATTERN_EMAIL); Matcher matcher = pattern.matcher(email); return matcher.matches(); } |