Use this regex it will work
var regex = /^\d{5}\.\d{2}$/;
var num = '23445.09';
console.log(regex.test(num)); // True
var num2 = '12345.6'
console.log(regex.test(num)); // False
5
solved Javascript Regex for decimal [duplicate]
Use this regex it will work
var regex = /^\d{5}\.\d{2}$/;
var num = '23445.09';
console.log(regex.test(num)); // True
var num2 = '12345.6'
console.log(regex.test(num)); // False
5
solved Javascript Regex for decimal [duplicate]