- The first Regular Expression Library on the Web!

Please support RegExLib Sponsors


Regular Expression Details

Title Test Find Pattern Title
matches a six character "password" that has to consist of numbers and letters with at least one letter in it.
123a12 | a12345 | aaaaaa
Author Rating: Not yet rated. James T. Kirk
Your Rating
Bad Good

Enter New Comment

Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Title: It's good
Name: yuvachandra
Date: 5/25/2007 5:51:33 AM
ya it's very good validator...!!

Title: Finally
Name: Stu
Date: 3/28/2005 10:36:23 AM
Finally found something that works. Thanks!

Title: MS Complex password validation
Name: Matt
Date: 10/7/2004 1:47:37 PM
Those are nice but a bit incomplete for most complex passwords in use. ((?=^.{6,255}$)((?=.*\d)(?=.*[A-Z])(?=.*[a-z])|(?=.*\d)(?=.*[^A-Za-z0-9])(?=.*[a-z])|(?=.*[^A-Za-z0-9])(?=.*[A-Z])(?=.*[a-z])|(?=.*\d)(?=.*[A-Z])(?=.*[^A-Za-z0-9]))^.* Matches MS recommended complex password criteria with 3 of 4 character catagories uppercase, lower case, numerical and special characters. Works with both the .Net Regex and Javascript Regex implimentations for server-side and client side validation.

Title: Won't work in IE5
Name: Chand
Date: 8/17/2004 3:03:31 PM
None of these work on IE5. The ? will cause an "unexpected quantifier" error in this browser.

Title: Very Helpful
Name: John
Date: 8/4/2004 11:11:14 AM
Just wanted to say that the regular expression you guys generated turned out to be very helpful for my own password requirements. Thanks a lot!

Title: Finally, the holy grail
Name: Tom
Date: 6/9/2004 2:20:23 PM
The above (from Matt & Anthony) (?!^[0-9]+$)(?!^[a-zA-Z]+$)^[0-9a-zA-Z]{6,13}$ is what I've been looking for, for a loooong time. Anyone know what the exclaimation mark means (!) ??

Title: Prevents All letters
Name: Matt & Anthony
Date: 5/27/2004 11:37:39 AM
This handles the all letters and all numbers cases as well as 11111111a. (?!^[0-9]+$)(?!^[a-zA-Z]+$)^[0-9a-zA-Z]{6,13}$

Title: re: Problem with small change
Name: Michael Ash
Date: 4/9/2004 1:16:04 PM
this will match 11111111a ^(?![0-9]{6,13}$)[0-9a-zA-Z]{6,13}$

Title: Problem with the small change
Name: Ben
Date: 4/9/2004 12:09:37 PM
there is a problem with that, in that if you have 7 numerical digits and an a (111111a) it will still fail. i added (?![a-zA-Z]{6,13}) in there as well, to prevent all letter passwords, yet i haven't found out how to allow for the above entry.

Title: Small Change
Name: Chris
Date: 4/5/2004 1:27:38 PM
This is one of the best password expressions I have found. I did make a small change though to allow password of sizes from 6 - 13. ^(?![0-9]{6,13})[0-9a-zA-Z]{6,13}$ Thank You for your submission.

Copyright © 2001-2018, | ASP.NET Tutorials