JSFiddle - React, Tailwind, and code Playground
by jameswiseman
JavaScript
var s = "<html>te<b>s</b>t</html>";
//alert(s.replace(/(<\/\w*>)$/,""));
alert(s.replace(/<\w*>([.])*(<\/\w*>)$/,""));
//alert(s.replace(/<\/?[^>]+(>|$)/g,""));
//alert(s.replace(/<\/?[^>]+(>|$)/g,""));