js正则表达式校验数字1

const input = '2434.34234'
const grep = /^(\d+)(\.\d+)?$/g;
grep.test(input);

posted @ 2023-07-05 17:13  Bravo_Jack  阅读(33)  评论(0)    收藏  举报