Var reg=/^[+-]? (\d|[1-9]\d+)(\.\d+)? $/; console.log(reg.test('0'));
    console.log(reg.test('00.20'))
Copy the code