Numbers
Scientific Notation
Matches numbers in scientific/exponential notation (e.g., 1.5e10).
Try it in RegexPro →Available in
Pattern
regexengine-agnostic
^-?\d+(\.\d+)?[eE][+-]?\d+$Raw source: ^-?\d+(\.\d+)?[eE][+-]?\d+$
How it works
`^-?\d+(\.\d+)?` matches a signed decimal. `[eE]` allows either exponent marker. `[+-]?\d+$` matches the signed exponent digits.
Examples
Input
1.5e10Matches
1.5e10
Input
-2.7E-5Matches
-2.7E-5
Input
3.14No match
—Common use cases
- •Scientific computing
- •Data import
- •Numeric parsing
Related patterns
Float / Scientific Number
NumbersMatch floating-point and scientific-notation numbers including `1.5`, `.25`, `1e10`, `-3.14E-2`.
Decimal Number
NumbersMatches decimal numbers, including integers and negatives.
Integer
NumbersMatches whole integers, including negative numbers.
Binary Number Literal
NumbersMatch binary number literals like `0b1010` or `0B11110000`.