java add forward 2f at the end of not present

Solutions on MaxInterview for java add forward 2f at the end of not present by the best coders in the world

showing results for - "java add forward 2f at the end of not present"
Mattia
02 Jul 2018
1const regex = new RegExp("^(/[a-z0–9/_\-]*)");
2console.log("/newsgjgjgj".replace(regex, "$1/"));
3console.log("/news?param1=value1".replace(regex, "$1/"));
4console.log("/news#anchor?param1=value1".replace(regex, "$1/"));
similar questions