Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
ECMAScript (JavaScript)

/
^150$|^(?:\d|[1-9]\d|1[0-4]\d)(?:.5)?$
/

Description

大于等于0, 小于等于150, 支持小数位出现5, 如145.5, 用于判断考卷分数

Submitted by anonymous - 5 years ago