why not 3 regular expressions?
1: check if its integer
2: if its a float
3: if its of the form 12.323e+3

those should be simple