Title |
Test
Find
Pattern Title
|
Expression |
^\d(\d)?(\d)?$ |
Description |
Matches positive whole numbers from 0-999 |
Matches |
0 | 12 | 876 |
Non-Matches |
1000 | 1.23 | -234 |
Author |
Rating:
Not yet rated.
|
Source |
|
Your Rating |
|
Title: Too simple
Name: Remi Sabourin
Date: 9/23/2003 2:22:08 PM
Comment:
Your regular expression albeit extremely simple and specific matches unwanted padded numbers such as 03 or 027.
Here's one that will not match these:
^\d|([1-9]\d)|([1-9]\d\d)$