i am using toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")
eg,
var n = 803427325.0326
n.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",")
it will show n = 803,427,325.0,326
but I need it like
n = 803,427,325.0326
and i update the regex to -> toString().replace(/\d(?=\d*.\d)(?=(?:\d{3})+(?!\d))/g, "$&,")
var n = 803427325.0326
n.toString().replace(/\d(?=\d*.\d)(?=(?:\d{3})+(?!\d))/g, "$&,")
and the result is fine
n = 803,427,325.0326
but for n = 803427325
but it result 803427325
i need it like 803,427,325