This is not good, and only does one tag per string, and will fail on large strings, 
but...

<cfset 
pageContent="<asdlgj>klsfjglksjg<cfquery>sdlkjgjsladg<gff></cfquery>slafkjglksafg">
<cfset tag="CFQUERY">
<cfset pageContent=replacenocase(pageContent,"</#tag#>","�","ALL")>
<cfset tagContent=rereplacenocase(pageContent,".*<#tag#>([^�]*)�.*","\1")>


FWIW
Jerry Johnson

>>> [EMAIL PROTECTED] 10/15/02 11:21AM >>>
Okay, I'm going insane.

I need to find all of the text between starting and ending tags, e.g.,
<CFQUERY...> and </CFQUERY>. Efforts to write the regular expression myself
have been frustrating. I'm >certain< it was discussed on this list not long
ago, but my searches in the houseoffusion.com archives and Google have both
been tantalizingly close, but ultimately not satisfying.

Subtags (e.g., <CFQUERYPARAM...>) needs to be included in the found text and
a non-greedy match is needed. And it needs to run on CF4.5.

Help?

-- 
Al Everett
Allied Office Products
www.askallied.com 
mailto:[EMAIL PROTECTED] 
v: 973-594-3209
f: 973-594-3626

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Reply via email to