Regular Expressions 101

Community Patterns

Community Library Entry

2

Regular Expression
PCRE (PHP <7.3)

/
[\-]?(\d+\.?(?:\d+)?(?:[eE][\-]?\d+)?)
/

Description

signed or unsigned numbers with exponents or not

Submitted by Mohammed Yehia - 9 years ago