I was trying my hands with regex. I want to capture a scenario when there are more than 2 numbers after decimal point. But I wasnt able to get any output from the below javascript code where as my regex works fine with online regex editors
var str = "1234.788";
var re = new RegExp("\d+");// simple basic regex: no output
// var re = new RegExp("\.d{3}") //regex to capture number when 3rd numberr is entered after decimal: no output
console.log(str.match(re));