publicstaticbooleanisEmail(String email){String str ="^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\\.[a-zA-Z0-9-]+)*\\.[a-zA-Z0-9]{2,6}$";Pattern p =Pattern.compile(str);Matcher m = p.matcher(email);return m.matches();}
记录一下Android开发中遇到的判断邮箱地址 public static boolean isEmail(String email) { String str = "^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\\.[a-zA-Z0-9-]+)*\\.[a-zA-Z0-9]{2,6}$"; Pattern p = Pattern.compile(str); Matcher m = p.matcher(email); ret