Untested code but something like this should work:

<cfset str = "dllCall1<%---session|errorTrap|DetailNumeric---%>EndDLLCall">

<cfset extracted = #mid(str,findnocase("<%---",str) + 
4,findnocase("---%>",str) - (findnocase("<%---",str) + 4))#

Basically, find the index of the first occurence of the open delimiter add 4 
to it to get the index of the first character after that string, then find 
the index of the end delimiter, find the number of characters between the 
two values and then use MID to return the string.

HTH

Donnie Bachan
Phone: (718) 217-2883
ICQ#: 28006783
"Nitendo Vinces - By Striving You Shall Conquer"
======================================================================
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited. If you received
this in error, please contact the sender and delete the material from any
computer.

----Original Message Follows----
From: "Michael Tangorre" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: CF-Talk <[EMAIL PROTECTED]>
Subject: regex help needed
Date: Mon, 2 Jun 2003 14:19:56 -0400

Can someone assist me in writing the following regex...
I have a string, varies in length and I need to pull out of the string all 
the characters between:   <%--- and  ---%>
An example of what this string might look like is:

"dllCall1<%---session|errorTrap|DetailNumeric---%>EndDLLCall"
I need to pull:  <%---session|errorTrap|DetailNumeric---%>

The surroudning text will always vary in length depending upon results....

Thanks,

Michael Tangorre
========================
[EMAIL PROTECTED]
www.realmagnet.com
work - 202-244-7845
fax - 202-244-7926
cell - 607-426-9277
========================

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to