strip html tags from string | strip html entities from string | regular expression for removing html entity from string

Using regular expression we can easily strip the HTML entities likes (” < > “).


var OriginalString="
  • sample text with html tags
"; var strippedHTMLStr=OriginalString.replace(/(<([^>]+)>)/ig,""); strippedHTMLStr.length; // length is 26 strippedHTMLStr; //sample text with html tags

Hope this helps


I Am suresh(suresh kumar )a Web developer,Freelancer,webdesigner,UI developer from bangalore. Got 6+ yrs of IT experience . I specialize in standards-based XHTML, CSS and JavaScript web development. Each site I develop is built to be search engine friendly (SEO), using the latest development principles and techniques.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *