Use regular matching to match a string of numbers

matches a regular from 0 to 0.01

Mar.10,2021

let reg = /^0(\.0(0\d*|10*)?)?$/

https://c.runoob.com/front-en. can test regularities here

Menu