Answers for "text replace space with underscore"

16

js replace space with underscore

var string = "my name";
string = string.replace(/ /g,"_"); //returns my_name
Posted by: Guest on April-24-2020
1

replace space with underscore in linux

for file in *; do mv "$file" $(echo $file | tr ' ' '_') ; done
Posted by: Guest on February-02-2022

Code answers related to "text replace space with underscore"

Code answers related to "Javascript"

Browse Popular Code Answers by Language