Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

remove spaces and line breaks javascript

const originalString = `
  <div>
    <p>Hey that's <span>somthing</span></p>
  </div>
`;

const strippedString = originalString.replace(/(<([^>]+)>)/gi, "");

console.log(strippedString);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #remove #spaces #line #breaks #javascript
ADD COMMENT
Topic
Name
1+1 =