I've been banging my head on this all day. All I want to do is put a number to
the left of each word that I find in my document so that I can eventually turn
those into links to jump from one match to the next. I have it partially
working. Here is my code:
<cfset getMatches = REMatch('#url.terms#', '#DocContents#') />
<cfloop index="i" from="1" to="#ArrayLen(getMatches)#">
<cfset DocContents = Insert("#i#", DocContents, REFind("#url.terms#",
DocContents, 0)) />
</cfloop>
What happens is, I put in coldfusion as a search term and it inserts the number
in the wrong spot. So it would be c1oldfusion, c2oldfusion, c3oldfusion, etc.
Anyone ever experience this before?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:350089
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm