Skip to main content
AllDevToolsHub
Back to all patterns

Scientific Notation Number

Dates & Numbers

Matches a numeric literal in optional scientific notation (1e9, 3.14e-2).

/^[-+]?[0-9]+(?:\.[0-9]+)?(?:[eE][-+]?[0-9]+)?$/

How it works

Matches integers, decimals, and scientific notation. Useful when parsing scientific data or JSON numeric values that may use exponents.

Test Cases

Should Match

  • 1
  • 3.14
  • -1.5e10
  • +2.5E-3

Should NOT Match

  • 1e
  • .5
  • 1e1.5

Quick Summary

Matches numeric literals with optional scientific notation.