Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
^(((\d{0,16})\.\d{1,16})|([0-9]{1})|([1-9]{1}\d{0,15})|[1-9]{1,3}(,\d{3}){1,}|(([1-9]{0,3},(\d{1,3}))*(\.\d{1,16}))|([1-9]{1,3},\d{3}))$
/
gm

Description

any int, any int with decimal any int with comma delimited any int with comma delimited and decimal

Submitted by amaroyche - 9 years ago