Answers for "regex for floating point number"

0

js string only positive float numbers

if ("10".match(/^(?!0\d)\d*(\.\d+)?$/)) {
	console.log('match')
} // expected output: 'match'

// matches
	// 10.0
	// 0.10
	// 123.456
// Does not match
	// a1
	// 00.10
Posted by: Guest on September-01-2020
0

floating point regex

^[+-]?([0-9]+([.][0-9]*)?|[.][0-9]+)$
Posted by: Guest on October-07-2021

Code answers related to "regex for floating point number"

Browse Popular Code Answers by Language