Also `/^\s*([+\-]?\d*(?:\.\d*)?(?:e[+\-]?\d+)?)\s*$/i` would be a bit closer to the ECMA spec.

Valid:
  * `-.42`
  * `42.`

Invalid:
  * `4.2E`