Android 验证邮箱的正则表达式 if (!(isEmail(mail))){ Utils.showToast(mContext,"请填写正确的邮箱格式地址"); return; } //判断email格式是否正确 public boolean isEmail(String email) { String str = "^([a-zA-Z0-9_\\-\
if (!(isEmail(mail))){ Utils.showToast(mContext,"请填写正确的邮箱格式地址"); return; } //判断email格式是否正确 public boolean isEmail(String email) { String str = "^([a-zA-Z0-9_\\-\\.]+)@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.)|(([a-zA-Z0-9\\-]+\\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\\]?)$"; Pattern p = Pattern.compile(str); Matcher m = p.matcher(email); return m.matches(); }