Displaying page
of
pages;
Items to
Title |
Test
Details
Real Float Number
|
Expression |
[+-]?+(?>\d++\.?+\d*+|\d*+\.?+\d++)
|
Description |
This regex is designed to fail fast (using possessive quantifiers) while still matching a floating decimal number all the time. Won't match scientific notation or fractions. Can be combined with other patterns.
Note: This site's tester does not support them.
If your language does not support possessive quantifiers try the following:
(?>[+-]?)(?>(?>\d+)(?>\.?)(?>\d*)|(?>\d*)(?>\.?)(?>\d+))
|
Matches |
+7 | -7.7 | .7 | 7. | etc
|
Non-Matches |
1/7 | 7e10
|
Author |
Rating:
Trinithis
|
Displaying page
of
pages;
Items to