Ringer

判断邮箱格式

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;
}
}

发表于 2014-10-18 12:16  Ringer  阅读(138)  评论(0编辑  收藏  举报
 

分类:

技术点:

相关文章: