| Title |
Test
Find
Positive Integer
|
| Expression |
^\d+$ |
| Description |
Positive integer value. |
| Matches |
123 | 10 | 54 |
| Non-Matches |
-54 | 54.234 | abc |
| Author |
Rating:
Steven Smith
|
| Source |
http://www.aspalliance.com/wiseasp/aboutregularexpression.asp |
| Your Rating |
|
Title: Zero is an acceptable value
Name: Dolu
Date: 8/23/2010 11:08:18 AM
Comment:
Zero is also a positive number, at least in a mathematic context.
Title: Accepts 0 as well, it should not
Name: Vineet Gupta
Date: 4/30/2009 4:26:13 PM
Comment:
A positive integer should not accept 0.
Title: Close but...
Name: Kevin
Date: 7/26/2005 3:55:29 PM
Comment:
this will also accept 0, which is not a positive integer
Title: Good 'n Simple
Name: Murray
Date: 3/15/2005 7:54:14 PM
Comment:
This is all you need for validating optional user input where you want a count of items.