i want to regex that match the following case: it will be used for input field as pattern;
case:
1. 000 //not match
2. 100.000 //match
3. 0 //match
4. 0.0 //match
5. 0.01 //match
6. 00100 // not match
7. 001.1 //not match
8. 101 // match
9. 0.0.01 //not match
10. 02001 // not match
i try with [0-9]+(\.[0-9][0-9]?)?
i will use in the input field as pattern. please help me.
<input type="text" required="" pattern="[0-9]+(\.[0-9][0-9]?)?" name="bstatus[bstatus_amount][]">
</div>