Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE (PHP <7.3)

/
(?'number'(?'float'(?>\d+[\.](?>\d+)?)|(?>(?>\d+)?[\.]\d+))|\d+)(?'exponent'e[+-](?&number))?
/
mg

Description

match a single number

Submitted by anonymous - 2 years ago (Last modified 2 years ago)