Regular Expressions 101

Community Patterns

Floats

0

Regular Expression
PCRE (PHP <7.3)

/
^[-+]?\d*\.?\d*(?=f$)
/
gm

Description

Floats including integers that end with "f" Version 2: value will exclude "f"

Submitted by anonymous - 4 years ago