Text
string.replace(’ ‘, ‘_’); // matches one space
string.replace(/ /g, ‘_’); // fixes all spaces Javascript is so odd.