密码必须包含1个数字和5个字母 [英] Password Must contain 1 numeric and 5 alphabets
本文介绍了密码必须包含1个数字和5个字母的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Helloo专家
我需要验证我的密码文本框,
这个pswd文本框必须带只有6个字符,
这个pswd文本框必须包含一个数字和5个字母。
请可以你告诉我怎么做这个
感谢@dvance。
Helloo Experts
I need to validate my password textbox,
This pswd textbox must take only 6 characters and,
this pswd textbox must contain one numeric and 5 alphabets.
Please can you show me how to do this
thanks in @dvance.
推荐答案
浏览这些链接。
密码条件
正则表达式参考
您好,
你可以使用正则表达式
参考
< a href =http://www.codearsenal.net/2012/11/7-regular-expressions-csharp-developer-must-know.html#.UXUEBaKnBjQ> 7 C#开发人员必须知道的正则表达式 [ ^ ]
在C#.NET中使用正则表达式 [ ^ ]
尝试使用以下表达式。
Hi,
you can make use ofregular expressions
refer
7 Regular Expressions a C# Developer Must Know[^]
Using Regular Expressions in C# .NET[^]
try with below expression.
^.*(?=.{6,})(?=.\d)(?=.{5,}[a-z,A-Z]).*
以上表达式验证,1个数字,5个字母和最多6个字符。
希望它有所帮助。
above expression validate for, 1 numeric, 5 alphabets and maximum 6 characters.
hope it helps.
这篇关于密码必须包含1个数字和5个字母的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文