Hi All,

I'm trying to find a way of using regular expressions to locate and replace 
text.  My application reads in some text containing links from a DB: e.g. 
../folderName/someCFMFile.cfm?code=AB.  I want to change all occurrences of 
this to ../folderName/AB.html.  Note that "code" can be any 
2-uppercase-character combination.  I've gotten to the point where I have 
../folderName/code using:

<cfset aData = Replace(stringFromDB, "someCFMFile.cfm", "", "ALL")>
<cfset aData = REReplace(aData, "../folderName/[A-Z]{2}", aData, "ALL")>


My problem is how to get it to replace what it matches with that same match 
(which would be ../folderName/code) with ../folderName/code.html? 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:322427
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