Displaying page
of
pages;
Items to
Title |
Test
Details
Pattern Title
|
Expression |
^\d*\.?\d*$ |
Description |
Matches any unsigned floating point number/numeric string. Also matches empty strings. |
Matches |
123 | 3.14159 | .234 |
Non-Matches |
abc | -3.14159 | 3.4.2 |
Author |
Rating:
Not yet rated.
Steven Smith
|
Title |
Test
Details
Pattern Title
|
Expression |
^[-+]?\d*\.?\d*$ |
Description |
Matches any floating point numer/numeric string, including optional sign character (+ or -). Also matches empty strings. |
Matches |
123 | +3.14159 | -3.14159 |
Non-Matches |
abc | 3.4.5 | $99.95 |
Author |
Rating:
Not yet rated.
Steven Smith
|
Title |
Test
Details
Pattern Title
|
Expression |
^[-+]?[0-9]+[.]?[0-9]*([eE][-+]?[0-9]+)?$ |
Description |
This matches floating point expression in a more rigorous way - accepts both exponent as well as non exponent notations. |
Matches |
123 | -123.35 | -123.35e-2 |
Non-Matches |
abc | 123.32e | 123.32.3 |
Author |
Rating:
Srinivas Gummadi
|
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 |
^-?\d*(\.\d+)?$ |
Description |
Matches all positive & negative decimal floating point numbers, to any magnitude. Allows empty string. |
Matches |
4.4 | .4 | -.4 |
Non-Matches |
. | ... | zero |
Author |
Rating:
Murray Roke
|
Displaying page
of
pages;
Items to