Regular Expressions 101

Community Patterns

Human weight in kg

0

Regular Expression
PCRE (PHP <7.3)

/
^(([1-3]\d{2}|\d{1,2})|(([1-3]\d{2}|\d{1,2}),\d{1,2}))$
/
g

Description

Match theses types of input : 0 0,00 0,07 7 3,5 15 399,99 399 80 80,09 80,85 etc...

Does not match : 090 400 and more 08 etc...

Match a range value between 0 and 399.

Submitted by Bloodbee - 8 years ago