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{1,7}$
Description
Positive Whole number matched from 0 to 9999999. Only 7 digits length is allowed.
Matches
1234567 | 9999999 | 1
Non-Matches
12345678 | 9999.99 | -1234
Author Rating: Not yet rated. Prashant Nayak
Source One of the Steve Smith's original one extended
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: Req 9 digits in length
Name: Jan
Date: 12/20/2017 7:30:59 PM
Comment:
Do you have the expression for 9 digits in length?


Title: allow hifen
Name: Peter
Date: 7/3/2013 3:28:24 PM
Comment:
How can i allow that an hifen can be inserted after 4 numbers? As an option. example for succesfull validation: 1500-000 2700-180 334444 1500 Invalid: 12-00000 153-2222 12563-21 thanks


Title: allow hifen
Name: Peter
Date: 7/3/2013 3:28:05 PM
Comment:
How can i allow that an hifen can be inserted after 4 numbers? As an option. example for succesfull validation: 1500-000 2700-180 334444 1500 Invalid: 12-00000 153-2222 12563-21 thanks


Title: allow hifen
Name: Peter
Date: 7/3/2013 12:45:58 PM
Comment:
How can i allow that an hifen can be inserted after 4 numbers? As an option. example for succesfull validation: 1500-000 2700-180 334444 1500 Invalid: 12-00000 153-2222 12563-21 thanks


Title: regex for greater than $250?
Name: Kris Baker
Date: 7/6/2010 3:04:10 PM
Comment:
Is there a way to create a regex that requires a field to be $250 or greater? Thanks!


Title: regex for greater than $250?
Name: Kris Baker
Date: 7/2/2010 4:10:34 PM
Comment:
Is there a way to create a regex that requires a field to be $250 or greater? Thanks!


Title: cellad
Name: cellad
Date: 9/10/2007 2:27:15 AM
Comment:
thnx


Title: Positive feedback
Name: Prashant Nayak
Date: 12/18/2003 12:25:05 PM
Comment:
Cool! Thanks for the feedback.


Title: The same regex without length restriction
Name: inkel
Date: 12/18/2003 12:21:43 PM
Comment:
This regexp: ^\d+$ will match any positive number without length restricion. Also, your regexp could be written like this: ^\d{1,7}$


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