Regular Expressions 101

Community Patterns

Complex numbers supporting scientific notation and extensive error-checking

0

Regular Expression
PCRE (PHP <7.3)

/
^(?<real>(?<decimal>[+-]?(?:\d*(?:\.(?=\d))?\d+))(?:(?:(?:(?<=\d)[Ee])?((?&decimal)))(?<=\d))?)(?:(?<=\d)[, ](?=\d|[+-]|\.)((?&real))[iIjJ])?$
/
g

Description

Loading markdown...
Submitted by anonymous - 6 years ago