Answers for "java add forward / at the end of not present"

0

java add forward / at the end of not present

const regex = new RegExp("^(/[a-z0–9/_\-]*)");
console.log("/newsgjgjgj".replace(regex, "$1/"));
console.log("/news?param1=value1".replace(regex, "$1/"));
console.log("/news#anchor?param1=value1".replace(regex, "$1/"));
Posted by: Guest on April-26-2021

Code answers related to "java add forward / at the end of not present"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language