diff options
author | Andrey Sobolev <andrey.n.sobolev@gmail.com> | 2019-06-14 00:36:15 +0500 |
---|---|---|
committer | Andrey Sobolev <andrey.n.sobolev@gmail.com> | 2019-06-14 00:36:15 +0500 |
commit | e3d23c2dddcf43c257748ee19e065007c7728758 (patch) | |
tree | a3d8f082c36f16c4a6f0b2bd0442f5fa121b20a9 /pyparsing.py | |
parent | 022af6b43a832f4ae796dbd8b2a533ffd8b0ed42 (diff) | |
download | pyparsing-git-e3d23c2dddcf43c257748ee19e065007c7728758.tar.gz |
Added support for omitted integer part in sci_real numbers
Diffstat (limited to 'pyparsing.py')
-rw-r--r-- | pyparsing.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pyparsing.py b/pyparsing.py index aff043c..188ae1a 100644 --- a/pyparsing.py +++ b/pyparsing.py @@ -6156,7 +6156,7 @@ class pyparsing_common: real = Regex(r'[+-]?\d*\.\d*').setName("real number").setParseAction(convertToFloat) """expression that parses a floating point number and returns a float""" - sci_real = Regex(r'[+-]?\d+([eE][+-]?\d+|\.\d*([eE][+-]?\d+)?)').setName("real number with scientific notation").setParseAction(convertToFloat) + sci_real = Regex(r'[+-]?\d*([eE][+-]?\d+|\.\d*([eE][+-]?\d+)?)').setName("real number with scientific notation").setParseAction(convertToFloat) """expression that parses a floating point number with optional scientific notation and returns a float""" |