正则表达式验证密码 [英] Regular Expression to validate password
本文介绍了正则表达式验证密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要验证系统用户输入的密码,以便
密码只包含字母和数字以及至少一个
大写字母。排除这些符号
,< ? / *()& ^%$#! 〜 ''
这是我的代码:
ereg(" [A-Za-z0-9 [^ \,\ < \> \ / \ * \(\)\&安培; \ ^ \%\ $ \#\〜\`\"!; \'']] + $",$ str)
我是否正确?
解决方案
#! 〜 ''
这是我的代码:
ereg(" [A-Za-z0-9 [^ \,\ < \> \ / \ * \(\)\&安培; \ ^ \%\
\#\! \〜\`\" \ '']] +
",
Hi,
I need to validate password keyed in by the system users so that the
password will contain only letters and numbers plus at least one
capital letter. Exclude these symbols
, < ? / * ( ) & ^ % $ # ! ~ ` " ''
this is my code:
ereg("[A-Za-z0-9[^\,\<\>\?\/\*\(\)\&\^\%\$\#\!\~\`\"\'']]+$", $str)
am i correct?
解决方案
# ! ~ ` " ''
this is my code:
ereg("[A-Za-z0-9[^\,\<\>\?\/\*\(\)\&\^\%\
\#\!\~\`\"\'']]+
",
这篇关于正则表达式验证密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文