当前位置:网站首页>regular expression

regular expression

2022-06-23 09:41:00 Linging_ twenty-four

1、 matching [0,1] At most two decimal places between . Include 0 and 1. Matching results :0、1、0.xx

/^(0(\.\d{1,2})?|1(\.0{1,2})?)$/

2、 matching [0,1] Decimal between , Unlimited number of decimal places .

/^(0(\.\d+)?|1(\.0+)?)$/
原网站

版权声明
本文为[Linging_ twenty-four]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/174/202206230929348872.html