Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
ECMAScript (JavaScript)

/
^(0|-?[1-9][0-9]{0,5})$
/

Description

1、匹配6位以内正负整数 2、可以匹配0

有效例子 0 21 -131452

无效例子 -01 01 1314520

Submitted by anonymous - 2 years ago