Hi Kay, this worked ok for me. Pretty much right off your post. DRE <cfset ugly = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">'> <cfset attributes.bodytext='<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> helllo hello'> <cfset attributes.bodytext = replace(attributes.bodytext, ugly,"","ALL")>
<form> <textarea cols="50" rows="6"><CFOUTPUT>#attributes.bodytext#</CFOUTPUT></textarea> </form> -----Original Message----- From: Kay Smoljak [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 27, 2001 9:13 AM To: CF-Talk Subject: More regexp madness Hi all, I am trying to do what seems like a simple task, but it's just not playing ball and I have no idea what I am doing wrong. I have a block of super-ugly ms-marked up text. There is a particular character sequence I want to get rid of - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">. Because it has so many special chars in it, the only way I could think of getting it into a variable is by using CFSAVECONTENT. So, I have this: <cfsavecontent variable="ugly"><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"></cfsavecontent> My text block is in a var called #attributes.bodytext#. I then try to remove the above string like this: <cfset attributes.bodytext= replace(attributes.bodytext,"#ugly#","","ALL")> But when I then output both of these vars (I do it in textareas so it displays properly in the browser), attributes.bodytext is unchanged. I have tried replacenocase, rereplace and rereplacenocase, but nothing is working. If anyone can shed any light I would really appreciate it! Ta, K. ______________________________________________________________________ Dedicated Windows 2000 Server PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER Instant Activation � $99/Month � Free Setup http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

