The docs for REFind() say that the third argument should be a positive integer, default value is 1.
REFind() returns the position in the string where the matched string begins. You'll need to add the length of the matched string (in your case, Len(url.terms) ) to this value to get the end of the matched string. Try this: <cfset DocContents = Insert("#i#", DocContents, REFind("#url.terms#", DocContents, 1)+Len(url.terms))/> HTH, -Carl ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:350092 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm