I'm trying to replace all "WUB" in a string with a blank space. The problem is, if I have 2 "WUB" in a row, it will return 2 blank spaces. How do only return 1 blank space if I have "WUBWUB"?
function songDecoder(song) {
var replacedLyrics = song.replace(/#|WUB/g,' ');
return replacedLyrics;
}