First off, I'm not sure what kind of HTML this is...

<a href>/SpecificDirectory
>
> /pathtofile.html</a>


Normally it would be <a href="/path/to/file.html">

Now here's what I would do...

<cfset fileContents = reReplace(fileContents, '<a[^>]*href="([^"]*)"[^>]*>',
"<cflocation url="\1">, "ALL")>

This is untested, but should work for normal HTML. You'll have to tweak it
if you want to use it with whatever you're doing.

-nathan strutz
http://www.dopefly.com/


On 2/2/07, Casey Dougall <[EMAIL PROTECTED]> wrote:
>
> Hi..
>
> Anyone have an idea on how I would go about replacing a tag surounding
> text
> with another tag?
>
> <a href>/SpecificDirectory/pathtofile.html</a>
> becomes <cfinclude template="/SpecificDirectory/pathtofile.html">
>
> I only want to change the link to an include when I know it's located in
> the
> "SpecificDirectory"
>
> --
> Casey
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:268489
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to