A headache. I want to match a positive integer, but it doesn"t include something like 1.0, so I want to convert a string first, and then go to the matching point regularly. as a result, if any form of conversion fails, 1.0 will be converted to 1. and directly use 1.0 numbers to regular match, it can not match to the point, as if the inside is first converted into a string and then matched.
has anyone ever encountered a similar demand? No matter how broken it is, you can"t use a function like toFixed, because the number may not be a decimal.