网页密码设置 [英] password setting for web page
本文介绍了网页密码设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我要在用户注册时验证密码,
该密码必须包含一个特殊字符,一个像这样的数字
有人可以帮我吗
i want to validate the password when the user is registering,
That password must contain one special character one number like that
any one help me please
推荐答案
(?=^.{8,}
(?=^.{8,}
)
这部分意味着还有8个字符,并且匹配从输入的开头开始.
((?=.*\d)
均值包含一个数字.
|(?=.*\W+))
或包含非字母或数字的内容
(?![.\n])
不是以点或UNIX换行符开头.
(?=.*[A-Z])
至少包含一个大写字母.
(?=.*[a-z])
包含至少一个小写字母
.*
)
This part means has 8 more more characters, and the match starts at the start of input.
((?=.*\d)
Means contains a digit.
|(?=.*\W+))
Or contains something that is neither a letter or a digit
(?![.\n])
not starting with a dot or UNIX newline.
(?=.*[A-Z])
Contains at least one capital letter.
(?=.*[a-z])
Contains at least one lowercase letter
.*
完全由非换行符组成,并且匹配的组将包含整个字符串.
替代品,请看:
此处 [此处 [这里 [
Consists entirely of non-newline characters and the matched group will contain the entire string.
For alternatives, have a look:
Here[^]
Here[^]
and Here[^]
这篇关于网页密码设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文