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 On Tue, Mar 18, 2008 at 12:11 PM, James Smith <[EMAIL PROTECTED]> wrote: > Assuming you meant <HEAD> and not [HEAD] you can use... > > reReplaceNoCase(thisPage.string,'<HEAD>(.+)</HEAD>(.*)','\1') > > If you meant to use square brackets it will change to... > > reReplaceNoCase(thisPage.string,'\[HEAD\](.+)\[/HEAD\](.*)','\1') > > -- > Jay > > On Tue, Mar 18, 2008 at 3:52 PM, Qasim Rasheed <[EMAIL PROTECTED]> > wrote: > > My regular expression skills are quite limited so before spending hours > on > > this, I thoughy may be someone can help me with this piece. > > > > [HEAD] > > <title>My Home Page</title> > > > > <link href="style.css" rel="stylesheet" type="text/css" /> > > [/HEAD] > > > > [BODY] > > <h1>Home Page</h1> > > [/BODY] > > > > I need a regular expression that will give me everything inside [HEAD} > tags > > without the tags. > > > > Thanks > > > > -- > > Qasim Rasheed > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:301504 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4