js string only positive float numbers

Solutions on MaxInterview for js string only positive float numbers by the best coders in the world

showing results for - "js string only positive float numbers"
Valentín
27 Mar 2019
1if ("10".match(/^(?!0\d)\d*(\.\d+)?$/)) {
2	console.log('match')
3} // expected output: 'match'
4
5// matches
6	// 10.0
7	// 0.10
8	// 123.456
9// Does not match
10	// a1
11	// 00.10