you can actually do both with the same regex... <cfset thisPage.result1 = reReplaceNoCase(thisPage.string,'\[HEAD\](.+)\[/HEAD\].*\[BODY\](.+)\[/BODY\]','\1')> <cfset thisPage.result2 = reReplaceNoCase(thisPage.string,'\[HEAD\](.+)\[/HEAD\].*\[BODY\](.+)\[/BODY\]','\2')>
-- Jay On Tue, Mar 18, 2008 at 4:19 PM, Qasim Rasheed <[EMAIL PROTECTED]> wrote: > Jay, > > Thanks for a quick response. It does work however if I add body as another > regex, the head section shows up in body. e.g. > > <cfsavecontent variable="wholestring"> > [HEAD] > <title>My Website</title> > <link href="view/_css/style.css" rel="stylesheet" type="text/css" /> > > [/HEAD] > [BODY] > <h1>Home Page</h1> > [/BODY] > </cfsavecontent> > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> > <html> > <head> > > <cfoutput>#reReplaceNoCase(wholestring,'\[HEAD\](.+)\[/HEAD\](.*)','\1')#</cfoutput> > </head> > <body> > > <cfoutput>#reReplaceNoCase(wholestring,'\[BODY\](.+)\[/BODY\](.*)','\1')#</cfoutput> > </body> > </html> > > Thanks ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;160198600;22374440;w Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:301505 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

