Hello Everybody, I need your help with regular expressions. I'm trying to strip out HTML tags from a string to pass it to a flash movie.
I've found a script that does this but the problem is that I want to keep some html formatting specifically the following tags: <b>, <br>, <span>, <i>, <strong>, <div>, <p> Here is the code: <cfscript> function StripHTML(str) { return REReplaceNoCase(str,"<[^>]*>","<br>","ALL"); } </cfscript> <cfset logtext = "<table> <tr><td><p><span class=body>This is some example text</span></p></td></tr> <tr><td><b>Friday 17 march, 2006</b><br>12:54 PM</td></tr> </table>"> <cfset str = StripHTML(logtext)> The above script strips out the everything between the opening and closing angle brackets "<" and ">". Is there any way to tell the regular expression to do the above but not process the following tags: <b>, <br>, <span>, <i>, <strong>, <div>, <p> I would be really greatful if someone could post the regular expression to do this. Best regards, cfcoder ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237683 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54