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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
^.{4,8}$
Description
Matches any string between 4 and 8 characters in length. Limits the length of a string. Useful to add to password regular expressions.
Matches
asdf | 1234 | asdf1234
Non-Matches
asd | 123 | asdfe12345
Author Rating: The rating for this expression. Steven Smith
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: Could allow any characters
Name: Ahmed Magdy
Date: 3/18/2016 12:17:17 PM
Comment:
1234 or aaaa would be a valid password with this regex


Title: Thank you
Name: Newbie
Date: 10/28/2011 5:49:34 PM
Comment:
Thank you for posting. Disagree with "User" comment. This was helpful.


Title: Additional for password regex
Name: Yunus
Date: 7/4/2006 12:36:24 AM
Comment:
extra for password regex, 4-8 in length, avoid whitespaces - ^[^\s]{4,8}$


Title: Waste of space
Name: User
Date: 6/13/2005 6:17:42 PM
Comment:
This belongs in a RegEx tutorial or FAQ, not here.


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