javascriptFebruary 23, 2006 8:47 pm
Strip Tags RegExp
var htstring = ‘<p align="Left"><b>Hello</b> <I>World</I></p>’;
var reg = new RegExp ("(<([^>]+)>)", "ig");
var stripped = htstring.replace(reg,"");
alert(stripped);
The RegExp comes from http://zamov.online.fr/EXHTML/DHTML/DHTML_983246.html
The URI to TrackBack this entry is: http://jdev.blogsome.com/2006/02/23/6/trackback/
No comments yet.
RSS feed for comments on this post.
Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>