Closed orange183 closed 1 year ago
const reg = /^-?(\d|[1-9]\d+).\d{3}$/ console.info(reg.test('10.920')) // output: true console.info(reg.test('10.92')) // output: false console.info(reg.test('10.9201')) // output: false
@yishengxiao00 针对2楼提供的修改{3}部分即可实现多位小数
{3}