Community Patterns

Community Library Entry

1

Regular Expression
Created·2015-03-27 17:22
Flavor·PCRE (Legacy)

/
^((100((\.|,)[0-9]{1,2})?)|([0-9]{1,2}((\.|,)[0-9]{0,2})?))$
/
Open regex in editor

Description

A number between 0 and 100 (including them) with up to two decimals. The decimal separator can be . or , . Usefull for percentage.

Submitted by anonymous