From 62904dc02c0e6fb56d6bbb4178a54bcf4ab53421 Mon Sep 17 00:00:00 2001 From: Sei Lisa Date: Wed, 13 Aug 2014 13:31:10 +0200 Subject: [PATCH] BUG-6466 was resurrected; the previous RE is valid. --- lslopt/lsljson.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lslopt/lsljson.py b/lslopt/lsljson.py index cd3e907..27ff91e 100644 --- a/lslopt/lsljson.py +++ b/lslopt/lsljson.py @@ -51,8 +51,9 @@ jsonnumbug_re = re.compile(ur'-?(?:[0-9]*([Ee])-?[0-9]*\.?[0-9]*|(?=[0-9Ee.])[0- # BUG-6466 fixed: # The new RE is just a modified version of the crap, allowing + exponents and # disallowing zeros, sometimes even when legal (e.g. 0e0) -jsonnum_re = re.compile(ur'-?(?:(?=[1-9]|\.(?:[^e]|$)|0(?:[^0-9e]|$))[0-9]*([Ee])[+-]?[0-9]*\.?[0-9]*|(?=[1-9]|\.(?:[^e]|$)|0(?:[^0-9e]|$))[0-9]*(\.?[0-9]*(?:[Ee][+-]?)?[0-9]*))') - +#jsonnum_re = re.compile(ur'-?(?:(?=[1-9]|\.(?:[^e]|$)|0(?:[^0-9e]|$))[0-9]*([Ee])[+-]?[0-9]*\.?[0-9]*|(?=[1-9]|\.(?:[^e]|$)|0(?:[^0-9e]|$))[0-9]*(\.?[0-9]*(?:[Ee][+-]?)?[0-9]*))') +# They've fixed BUG-6657 by bringing BUG-6466 back to life. +jsonnumbug_re = re.compile(ur'-?(?:[0-9]*([Ee])-?[0-9]*\.?[0-9]*|(?=[0-9Ee.])[0-9]*(\.?[0-9]*(?:[Ee]-?)?[0-9]*))') jsonstring_re = re.compile(ur'"(?:[^"\\]|\\.)*"')