I have a problem with replacing some strings with duplicated values. Here is snippet:
const firstStep = this.router.url.replace(/[\d\/]/g, '.');
Above returns when url like /project/1/cost-estimate it gives me .project...cost-estimate. So i need to replace this ... to . or project.project -> project.. How i do that ? Any advice ?
this.router.url.replace(/[\d\/]+/g, '.')