邮箱检测

来源:互联网 发布:淘宝买iphone7推荐店铺 编辑:程序博客网 时间:2024/04/28 12:48
/** * 判断邮箱 *  * @param str * @return */public static boolean phoneEmail(String str) {    String strPattern = "\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*";    Pattern p = Pattern.compile(strPattern);    Matcher m = p.matcher(str);    if (m.matches()) {        return true;    } else {        return false;    }}
0 0
原创粉丝点击