js 经常用于条件判断 大于等于0 的正整数

 

/^\d+(?=\.{0,1}\d+$|$)/.test(0) // true

 

 

转:https://www.jianshu.com/p/feef5e62dd67

 

posted @ 2019-08-28 10:30  James2019  阅读(8579)  评论(0编辑  收藏  举报