Displaying page
of
pages;
Items to
Title |
Test
Details
Pattern Title
|
Expression |
^[-]?([1-9]{1}[0-9]{0,}(\.[0-9]{0,2})?|0(\.[0-9]{0,2})?|\.[0-9]{1,2})$
|
Description |
This regular expression will match on a real / decimal / floating point / numeric string with no more than 2 digits past the decimal. The negative sign (-) is allowed. No leading zeroes or commas. It is based on a currency regular expression by Tom Persing.
|
Matches |
123 | 123.54 | -.54
|
Non-Matches |
123.543 | 0012 | 1,000.12
|
Author |
Rating:
Not yet rated.
T H
|
Title |
Test
Details
Pattern Title
|
Expression |
^(0)$|^([1-9][0-9]*)$
|
Description |
This regular expression matches on postive whole numbers and 0. Whole numbers that are left padded with 0's are not a match.
|
Matches |
12 | 0 | 1200
|
Non-Matches |
-12 | 0012
|
Author |
Rating:
Not yet rated.
T H
|
Displaying page
of
pages;
Items to