Hi again Kay, Actually, it seemed to work fine with cfsavecontent also. Like below. In fact I think the code worked right off your post!! Either way. hth. DRE
<cfsavecontent variable="ugly"><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"></cfsavecontent> <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:36 AM To: CF-Talk Subject: Re: More regexp madness Aha. Must be the savecontent - it's not doing what I thought it would. I didn't think of using single quotes to set the #ugly# variable - that worked perfectly! Thanks. "Andre Turrettini" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>... > 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.bodytex= > 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

