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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
^(?=.*\d).{4,8}$
Description
Password expression. Password must be between 4 and 8 digits long and include at least one numeric digit.
Matches
1234 | asdf1234 | asp123
Non-Matches
asdf | asdf12345 | password
Author Rating: Not yet rated. Steven Smith
Source http://aspalliance.com/QuickStart/howto/doc/RegexCommon.aspx
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: error
Name: pasquale
Date: 4/21/2009 6:37:29 AM
Comment:
it doesn't work with ie7!


Title: Harold
Name: Harold
Date: 11/2/2004 11:10:23 AM
Comment:
Hi Steven, It should probably be mentioned that this does not work on the Client side Regex. I had to use ^(?=.*\d+).{1,8}$ for the the atleast one validation and another control with ^.{4,8}$ to check length. Tried all diferrent combinations. Please let me know if I am doing something wrong!! Thanks Harold


Title: Punctuation
Name: Darren Neimke
Date: 10/21/2003 10:59:40 AM
Comment:
Dick... do you mean something like: ^(?=\w*\d)[\w]{4,8}$


Title: Puncuation
Name: Dick
Date: 10/21/2003 10:02:00 AM
Comment:
Can we add a filter to reject a password with a non-alphanumeric (punctuation) in it?


Title: student
Name: kris
Date: 3/30/2003 8:28:35 PM
Comment:
great one..thanks a lot


Copyright © 2001-2014, RegexAdvice.com | ASP.NET Tutorials