>
> Going by your example I tried the code below it threw an error but I stuck
> an extra # but doesn't seem to do anything....I've tried a some workarounds
> with joy.
>
> <cfset stringToWork = Rereplace("http://127.0.0.1/imp/www/index.cfm?id=889
> ","([^?#]*/imp/www)/(\d+).cfm","\1/index.cfm?id=\2","ALL")>
>
> <cfoutput>#stringToWork#</cfoutput>
>Ah, what I had given you will work the other way round - converting from 889.cfm to index.cfm?id=889 Just to be clear, here are a couple of working examples for both directions... <cfset input = "http://127.0.0.1/imp/www/index.cfm?id=889"/> <cfset output = rereplace( input , "([^?##]*/imp/www)/index.cfm\?id=(\d+)" , "\1/\2.cfm" )/> <cfoutput>#input# -> #output#</cfoutput> <hr/> <cfset input = "http://127.0.0.1/imp/www/889.cfm"/> <cfset output = rereplace( input , "([^?##]*/imp/www)/(\d+).cfm" , "\1/index.cfm?id=\2" )/> <cfoutput>#input# -> #output#</cfoutput> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/RegEx/message.cfm/messageid:1166 Subscription: http://www.houseoffusion.com/groups/RegEx/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.21
