Decimal or numeric values in regular expression validation

前端 未结 10 1270
礼貌的吻别
礼貌的吻别 2020-11-22 15:09

I am trying to use a regular expression validation to check for only decimal values or numeric values. But user enters numeric value, it don\'t be first digit \"0\"

10条回答
  •  粉色の甜心
    2020-11-22 15:37

    Below is the perfect one for mentioned requirement :

    ^[0-9]{1,3}(,[0-9]{3})*(([\\.,]{1}[0-9]*)|())$
    

提交回复
热议问题