1 String check =
2
3 "^([a-z0-9A-Z]+[-|\\.]?)+[a-z0-9A-Z]@([a-z0-9A-Z]+(-[a-z0-9A-Z]+)?\\.)+[a-zA-Z]{2,}$" ;
4 Pattern regex = Pattern.compile (check) ;
5 System.out.println (regex.toString ());
6 Matcher matcher = regex.matcher (s) ;
7 boolean isMatched = matcher.matches () ;
posted on 2007-02-08 09:46
-274°C 阅读(668)
评论(3) 编辑 收藏 所属分类:
正则表达式 、
计算机综合