posts - 35,  comments - 7,  trackbacks - 0
1、密码由6-32位字母、数字或下划线构成;
2、至少需要一位小写字母;
3、至少需要一位大写字母;
4、至少需要一位数字。

String password = "password";
        System.out.println(password 
!= null && password.length() >= 6
                
&& password.length() <= 32
                
&& Pattern.compile("[a-z]+").matcher(password).find()
                
&& Pattern.compile("[A-Z]+").matcher(password).find()
                
&& Pattern.compile("[\\d]+").matcher(password).find());
posted on 2006-05-10 09:10 java小记 阅读(401) 评论(0)  编辑  收藏 所属分类: 转载

只有注册用户登录后才能发表评论。


网站导航:
 

<2006年5月>
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910

常用链接

留言簿(1)

随笔分类

随笔档案

搜索

  •  

最新评论

阅读排行榜

评论排行榜