I can now confirm that :-)
Thought it might have been my regex

Now have
<cfset x = refindNoCase('(<CFLOCATION URL=")([^"]*)("[^>]*>)', fileContents,
startPos,true) />

This returns a struct of arrays
with array element 0 being the complete string
but even better, elements 1-3 corresponding to the parentheses in the re
expression
so I can wrap the urlSessionFormat function around array element 2

If you are interested in getting your hands on the script, just let me know.

On 2/12/07, James Holmes <[EMAIL PROTECTED]> wrote:
>
> reFind finds only one occurrence at a time. You need to loop over the
> file contents, doing the reFind() until the find doesn't find
> anything.
>
> On 2/12/07, AJ Mercer <[EMAIL PROTECTED]> wrote:
> > Hi All,
> >
> > I have a lot of cflocations in my application and I want to modify the
> URL
> > attribute
> > from:<cflocation url="#ATTRIBUTES.url#" addtoken="no">
> > to:    <cflocation url="#urlSessionFormat(ATTRIBUTES.url)#"
> addtoken="no">
> >
> > first off, any one know of an easy why to do it?
> >
> >
> > I am in the process of writing a cf script that gets all the files,
> reads
> > the files and then was planning on doing a regex find and then some
> funky
> > string manipulation to drop in the function.
> >
> > I have got to the refind part, but am struggling with the expression.
> This
> > is what I have
> >     <cfset x = refindNoCase("<CFLOCATION[^>]*>", fileContents, 0,true)
> />
> > but it seems to only be finding the first occurrence.
>
> --
> CFAJAX docs and other useful articles:
> http://www.bifrost.com.au/blog/
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7 
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs 
http:http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:269489
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to