Title |
Test
Find
Floating Number
|
Expression |
^([-+]?(\d+\.?\d*|\d*\.?\d+))$ |
Description |
DESCRIPTION
Parses a floating number (such as double or float) from an input string. Please remove all spaces from the input string before using this regex pattern.
MATCHING EXAMPLES
The following symbols are used:
'[]' means optional parameter;
'|' means OR;
'+' is the positive sign;
'-' is the negative sign;
'#' means one or more decimal digits;
'.' is decimal seperator. |
Matches |
[+|-]#[.[#]]|[#].# |
Non-Matches |
[+|-][.] -OR- any floating number with an exponent (e.g. 1.0E-8) -OR- any string with more than one sign or decimal seperator -OR- any string with non-leading sign |
Author |
Rating:
Not yet rated.
Fischer, M.
|
Source |
|
Your Rating |
|