判断邮箱格式

public static boolean isEmail(String strEmail) {
String strPattern = "\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*";
Pattern p = Pattern.compile(strPattern);
Matcher m = p.matcher(strEmail);
if (m.matches()) {
return true;
}else {
return false;
}
}

原文地址:https://www.cnblogs.com/Ringer/p/4032882.html