Replace vs Replace All
There is a good chance that replace does not work how you think: const numbers = "10.00.00.0000" const replaced = numbers.replace(".", "_") console.log(replaced) // '10_00.00.0000' Wait what? It only replaced the first instant, replace is a simple ...