Use more general regex for numbers to cover scientific notation

The regex was taken from:
https://docs.python.org/2/library/re.html#simulating-scanf
Also reused number_re in a couple of other places

Signed-off-by: CJlano <cjlano+github@free.fr>