RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
^(?![0-9]{6})[0-9a-zA-Z]{6}$
Description
matches a six character "password" that has to consist of numbers and letters with at least one letter in it.
Matches
123a12 | a12345 | aaaaaa
Non-Matches
111111
Author Rating: Not yet rated. James T. Kirk
Source
Your Rating
Bad Good

Enter New Comment

Title
 
Name
 
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: perfect
Name: tejaswi
Date: 6/4/2018 3:34:57 AM
Comment:
100% done


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


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


Title: MS Complex password validation
Name: Matt
Date: 10/7/2004 1:47:37 PM
Comment:
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
Comment:
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
Comment:
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
Comment:
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
Comment:
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
Comment:
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
Comment:
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
Comment:
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-2024, RegexAdvice.com | ASP.NET Tutorials