/ Published in: JavaScript
Expand |
Embed | Plain Text
function removeHTML(strInputCode) { strInputCode = strInputCode.replace(/&(lt|gt);/g, function (strMatch, p1){ return (p1 == "lt")? "<" : ">"; }); var strTagStrippedText = strInputCode.replace(/<\/?[^>]+(>|$)/g, ""); return strTagStrippedText; }
You need to login to post a comment.
