Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

clean url javascript

let int = 0
let cleanupUrl = ""
let url = 'github.com/gin-gonic/gin'
int = url.match(/[/]/g).length

if(int === 2) {
 cleanupUrl = url.replace(/.*[/]/g, '')
}

console.log(cleanupUrl)
 
PREVIOUS NEXT
Tagged: #clean #url #javascript
ADD COMMENT
Topic
Name
7+3 =