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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
^[12345]$
Description
This matches a single numeric digit between 1 and 5, and is the same as saying ^[1-5]$.
Matches
1 | 2 | 4
Non-Matches
6 | -1 | abc
Author Rating: Not yet rated. 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: Double digits.
Name: g1smd
Date: 10/27/2012 5:45:07 PM
Comment:
Double digit: ^[1-9]?[0-9]$ allows 0 to 9 and 10 to 99. ^1?[0-9]$ allows 0 to 9 and 10 to 19. ^([1-9]|1[01])$ allows 1 to 9 and 10 and 11.


Title: Double er Nuthin'
Name: Animal
Date: 1/19/2007 4:06:38 PM
Comment:
What about double digit? I want to validate height (inches only). I want 0 - 11 to be valid values.


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