]> arthur.barton.de Git - netdata.git/commitdiff
fix for properly parsing apache scientific numbers #211
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Wed, 13 Apr 2016 07:52:25 +0000 (10:52 +0300)
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Wed, 13 Apr 2016 07:52:25 +0000 (10:52 +0300)
plugins.d/charts.d.plugin

index aaf7c13be6107444b285b9f42420a05570e2a4ab..27b29470926657bed1ef33f6fe5fa2037a71920f 100755 (executable)
@@ -250,7 +250,7 @@ float2int() {
        l=$[ ${#m} - 1 ]
 
        # check if the number is in scientific notation
-       if [[ ${f} =~ ^[[:space:]](-)?[0-9.]+(e|E)(\+|-)[0-9]+ ]]
+       if [[ ${f} =~ ^[[:space:]]*(-)?[0-9.]+(e|E)(\+|-)[0-9]+ ]]
                then
                # convert it to decimal
                # unfortunately, this fork cannot be avoided