Tech
Forums
Jobs
Books
Events
Live
Interviews
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
1
Reply
Regular Expression for strong password
Shrikant Palla
Jun 4 2010 3:11 AM
3.6k
Reply
Hi all,
I have a requirement where i used regular expression in asp.net application which will validate the password entered by the user based on some conditions.
1) Minimum password length should be 8.
2) Must contain alphanumeric with minimum 3 numerics (numerics can be anywhere in the string like 1bc23ef#@,123@abcd,abcd!@123).
I have used the below expression
^.*(?=.{8,})(?=.*[a-zA-Z0-9])(?=.*\d{3}).*$
bt it fails as it is accepts the below pattern
1) 123456789
it does not accept if i enter the password as abc1ef32!@
but works if i give as 123@abcd or abcd!@#123
any help is highly appreciated.
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
asp.net mvc dialog box mechanics at the end of the request
how to send all pages from gridview control to email using asp.net with c#