/ Published in: ActionScript 3
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
var myString:String = "<p><b>bold</b> <i>italic</i> <a href='#'>link</a> <br>linebreak</p>"; trace(myString) var removeHtmlRegExp:RegExp = new RegExp("<[^<]+?>", "gi"); myString = myString.replace(removeHtmlRegExp, ""); trace(myString); // OUTPUT // <p><b>bold</b> <i>italic</i> <a href='#'>link</a> <br>linebreak</p> // bold italic link linebreak