2
7
^\d{1,10}\.\d{1,8}$
6
var str12="0.97"; var re1=/^\d{0,10}\.\d{0,8}$/ if(!re1.test(str12)){ alert('不正确') } else{alert('正确')}