|
|
Posted on
2009-10-10 08:29
刘政道
阅读( 172)
评论()
收藏
举报
 Code 1 public static boolean isEmail(String str) 2 { 3 if(str == null) 4 return false; 5 Pattern pattern = Pattern.compile("^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$"); 6 return pattern.matcher(str).matches(); 7 }
|