正则表达式:最少6个字符2位数和1个特殊字符 [英] Regex: minimum 6 characters 2 digits and 1 special character
本文介绍了正则表达式:最少6个字符2位数和1个特殊字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
需要正则表达式来检查密码政策
和密码政策应该:
长度密码:最少6个字母
2位数
1特殊标志
我试过的:
我试过::
ValidationExpression =^(?=。* \ d)(?=。 [!?$ @ $%*&安培;#'()+, - /:;。< => [\] ^ _`{|}〜] *)[A-ZA-z\d $ @ $!%*?&#'()+, - ./ :;< => [\] ^ _` {|}〜] {6,}
是不是写了?如果没有怎么写呢?
解决方案
@
!%*?&#'()+, - ./:;& LT; => [\] ^ _`{|}〜])[A-ZA-z\d
@
Need regular expression to check the password policy
and the password policy should :
length of password :minimum 6 letters
2 digits
1 Special sign
What I have tried:
I tried ::
ValidationExpression="^(?=.*\d)(?=.*[$@$!%*?&#'()+,-./:;<=>[\]^_`{|}~"])[A-Za-z\d$@$!%*?&#'()+,-./:;<=>[\]^_`{|}~"]{6,}"
is it write or not?? if not how to write it??
解决方案
@
!%*?&#'()+,-./:;<=>[\]^_`{|}~"])[A-Za-z\d
@
这篇关于正则表达式:最少6个字符2位数和1个特殊字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文