showing results for - "javascript replace space with minus"
Emmeline
16 Aug 2018
1// replaces space with '-'
2str = str.replace(/ /g, "-");
3// or
4str = str.split(' ').join('-');
queries leading to this page
javascript replace all spaces with dashjavascript replace spaces with dashesreplace space with dashnodejs replace all space with dashjs replace dash and spacesreplace dash with spaces javascriptreplace string spaces with dashesjavascript change dash to spacereplace spaces in string with dashreplace space with dash pythonreplace space in string with dashjs input replace space with dashjavascript replace dash with spacetypescript replace space with dashjquery change space to dashjs replace space with dashjquery replace space with dashreplace dashes with spaces javascriptjs string replace space with dashjavascript replace space with dash in urljavascript replace space with dashjs replace all dashes with spacepython string replace space with dashregex replace dash with spacereplace spaces with dashes jsjavascript string replace dash with spacejquery string replace spaces with dashesreplace all space with dash of string in javascripthow to replace space with dash in javascriptreplace space with dash javascriptreplace extra space with dashjs replace spaces with dashesjs replace all spaces with dashjs replace space with dash and lowercasejavascript replace all spaces with dashesjavascript replace dashes with spacesreplace dash with space jqueryregex replace space with dashformat string to replace spaces with dashesjs replace dash with spacecan i replace dashes with spacesjavascript replace all spaces with single dashjs change space to dashreplace dash with space jsreplace spaces with dasheshow to replace space with dash in jqueryjs replace whitespace with dashhow to replace dash with space jsreplace space with dash jsadd dash instead space in string jshoe to change a space to a dash in jsjs string replace spaces with dasheshow to replace white spaces with dash in javascriptreplace space by dashjavascript replace space with minus