cjlano/svg — pull request #5 by lesteve (2014-09-08 21:32:36+00:00)
Title: Use more general regex for numbers to cover coordinates using the scientific notation

Trying to parse this simple [SVG](https://gist.githubusercontent.com/lesteve/d963b88daf162928cafc/raw/5abf902b02c56341567433cdfa1b819047d11b73/line_with_scientific_notation_coordinates.svg), created with Inkscape, raises the following exception ```IndexError: pop from empty list```.

This happens because the regex doesn't cover floating point numbers using the scientific notation, e.g. 1.3e-4. From what I understand from http://www.w3.org/TR/SVG/paths.html#PathDataBNF, coordinate using the scientific notation is fine as far as the SVG standard is concerned.

The floating point regex was taken from: https://docs.python.org/2/library/re.html#simulating-scanf. One slight change is that there is no space allowed between the potential sign and the next digit. The thing is that the float function is applied to the matches in some of the code, and that would fail if there was a space.

Also I reused the ```number_re``` regexp in a couple of other places which seemed like they were trying to find a number.