I need to delete the following characters from a url ":" "." "\" "/"
how can i do this in javascript?
original: https://www.sito.it/ricette-cat.html
convert: https-www-sito-it-ricette-cat-html
thanks
I need to delete the following characters from a url ":" "." "\" "/"
how can i do this in javascript?
original: https://www.sito.it/ricette-cat.html
convert: https-www-sito-it-ricette-cat-html
thanks
var str = 'https://www.sito.it/ricette-cat.html'
console.log(str.replace(/[^\w]+/ig,'-'))