Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

JavaScript Text Replace

let text = "I     love you"
text = text.replace( / +/g, '_') // replace with underscore ('_')

console.log(text) // I_love_you
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #JavaScript #Text #Replace
ADD COMMENT
Topic
Name
1+3 =