Title |
Test
Find
Floating Number With Exponent
|
Expression |
^([-+]?(\d+\.?\d*|\d*\.?\d+)([Ee][-+]?[0-2]?\d{1,2})?)$ |
Description |
DESCRIPTION
Parses a floating number with an optional exponent 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 an optional parameter;
'|' means OR;
'+' means the positive sign;
'-' means the negative sign;
'#' means one or more numbers (0...9);
'.' is the decimal seperator;
'E|e' are the valid exponent symbols;
'...' is the range of values for the exponent. |
Matches |
[+|-]#[.[#]]|[#].#[E|e[+|-]0...299] |
Non-Matches |
[+|-][.][E|e[+|-][0...299]] -OR- [+|-]#[.[#]]|[#].#E|e[+|-]300...∞ -OR- any string with more than one sign on mantissa or on exponent -OR- any string with non-leading signs on mantissa or exponent -OR- any string with more than one decimal seperator on mantissa | any string with one or more decimal seperators on exponent |
Author |
Rating:
Not yet rated.
Fischer, M.
|
Source |
|
Your Rating |
|