Return to Snippet

Revision: 33766
at October 13, 2010 05:24 by rumremix

Initial Code
<TITLE> Regular Expressions: stripping HTML tags </TITLE> 
var htstring = '<p align="Left"><b>Hello</b> <I>World</I></p>'; 
var stripped = htstring.replace(/(<([^>]+)>)/ig,""); 

with (document) { 
write ('Original string:' + htstring + '<br>'); 
write ('Stripped string:<br><br>' + stripped); 

Initial URL

Initial Description

Initial Title
strip html tags from a string in Javascript

Initial Tags
javascript, html

Initial Language