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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Numbers 1-10
Expression
^[1-9]0?$
Description
Numbers ranging from 1 through 10
Matches
2, 10 , 1
Non-Matches
0, 11,2.2,0.21
Author Rating: The rating for this expression. Aditya Sunchu
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: this will auslo allow 20 30 40 ...
Name: XSeb74
Date: 7/31/2019 3:23:19 PM
Comment:
you should use ^[1-9]|10$ Or ^10?|[2-9]$


Title: adds more than 1-10
Name: Rich Curry
Date: 3/6/2013 10:43:12 AM
Comment:
^[1-9]0?$ will also allow 20, 30, 40, 50...


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