Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
ECMAScript (JavaScript)

/
^(?!0$)\d+(\.\d{1,2})?$
/
gm

Description

不得輸入0、空值、符號、負數(僅限溫度)、小數點(僅支援後2位)

Submitted by anonymous - 2 years ago