Andrew Durdin wrote: > That will work for numbers such as 0123 12.345 12. 0.5 -- but it > won't work for the following: > 0x12AB .5 10e-3 -15 123L This will handle the normal floats including a leading + or - and trailing exponent, all optional. r"[+-]?((\d+(\.\d*)?)|\.\d+)([eE][+-]?[0-9]+)?" Andrew dalke at dalkescientific.com