Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

replace spaces with backslash js

input = "Hello my name is Luke"
inputWithoutSpaces = input.replace(/s/g, "_"); // s == space
console.log(inputWithoutSpaces); //Output: "Hello_my_name_is_Luke"
 
PREVIOUS NEXT
Tagged: #replace #spaces #backslash #js
ADD COMMENT
Topic
Name
1+1 =