Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js replace whole word and not words within words

const sampleString = "xsmall small medium";

console.log(sampleString.replace(/small/g, "test"));
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #js #replace #word #words #words
ADD COMMENT
Topic
Name
3+9 =