Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE2 (PHP >=7.3)

/
^[-+]?(\d+[,.]|\d*[.,]?\d+)(e[-+]?\d+)?$
/
i

Description

Check if a floating point number (e.g. 3.14159) is in a valid format.

Submitted by anonymous - 2 months ago