JS substitua o espaço
// replaces space with '_'
str = str.replace(/ /g, "_");
// or
str = str.split(' ').join('_');
VasteMonde
// replaces space with '_'
str = str.replace(/ /g, "_");
// or
str = str.split(' ').join('_');
string = string.replace(/\s\s+/g, ' ');
string.replace()