Skip to end of metadata
Go to start of metadata
You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
Version 1
Next »
Remove span and strong tag from string
let re = /(<\s*strong[^>]*>)|(<\s*\/\s*strong>)|(<\s*span[^>]*>)|(<\s*\/\s*span>)/g
let str = 'Hello <p>my</p> name <strong>is</strong>, <span style="color: rgb(17, 17, 17); font-family: "Amazon Ember", Arial, sans-serif; font-size: medium;">Taskmonk</span> is a company <strong>in India. <span>how </br>are'
console.log(str.replace(re, ""))