Re: RegularExpression Validation for password in ASP.NET
- From: "bienwell" <bienwell@xxxxxxxxxxx>
- Date: Tue, 15 Apr 2008 08:50:28 -0400
Thanks for your help.
<wisccal@xxxxxxxxxxxxxx> wrote in message
news:60d1bad3-1e68-4a1f-bf2a-fd7b53153cd2@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I'm not a regex expert either, but based on the previous post, this
seems to work:
Regex.IsMatch(
input, "(?!^[0-9]*$)(?!^[a-z]*$)(?!^[A-Z]*$)(?!^[a-z0-9]*$)(?!^[A-
Z0-9]*$)^([a-zA-Z][a-zA-Z0-9]{8,25})$")
)
============
Regards,
Steve
www.stkomp.com
bienwell wrote:
Hi all,
Can any one help me to write a regular expression to validate the
password
entered on the text field in ASP.NET. The rules for the password are:
1- There must be at least one number in the password.
2- There must be upper and lower case letters in the password.
3- Password must begin with an alphabetic character.
4- Password cannot contain illegal characters, such as =, <, >, ;, :,
'
, " or comma (equal sign, greater sign, less than sign, semicolon, colon,
single quote, double quotes, comma).
5- Password must be between 8 and 25 characters.
I'm not good at writing the expression. Please help me out.
Thanks in advance.
.
- References:
- RegularExpression Validation for password in ASP.NET
- From: bienwell
- Re: RegularExpression Validation for password in ASP.NET
- From: wisccal
- RegularExpression Validation for password in ASP.NET
- Prev by Date: Re: RegularExpression Validation for password in ASP.NET
- Next by Date: Re: move back to bottom of page after postback
- Previous by thread: Re: RegularExpression Validation for password in ASP.NET
- Next by thread: PerformanceCounterCategory.Create() takes 3 minutes to add a new category!! How come? What can cause this?
- Index(es):
Relevant Pages
|