A Regular Expression to check if the number you provide is a float value.
/^[-+]?[0-9]+[.]?[0-9]*([eE][-+]?[0-9]+)?$/
Matches:
- 12345
- -123.45
- 123.45e-5
Non-matches:
- abcd
- 123.45e
- 12.34.56
A Regular Expression to check if the number you provide is a float value.
/^[-+]?[0-9]+[.]?[0-9]*([eE][-+]?[0-9]+)?$/