Matches 0.1 but does not match the regularity of 01

I want to match the regularity of 0.1 but not 01. Now I use this regular / ^ 1-9 + (. {0jue 1} [0-9] {0je 2}) $/ to exclude 01 but also exclude 0.1? Could you tell me how to modify it? Or there are other better regularities that achieve the following results: (1) it can be 0.1 but 01 is the wrong format

Mar.05,2021

can only enter two decimal places, and it is contradictory to match to 0.1. You might as well write out all the requirements


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

Link

Menu