Friday 21 June 2024

JS remove regex

function removeHtmlTags(str) { return str.replace(/<\/?[^>]+(>|$)/g, ""); } 

No comments:

Post a Comment