[thelist] Help with a replace loop

sarah disaster7 at yahoo.com
Mon Jun 11 14:33:48 CDT 2001

<cfloop query="GetKeywords">
    <cfif FindNoCase(x,theString) is not 0>
	<cfset theString = ReplaceNoCase(theString,x,'<a

This works, however, if say one of your keywords is
"age" and theString contains "average", a link will
get tacked onto the "age" part of average. I tried to
think of a way around this, but nothing popped into my
head at the moment. I'll try to see if I can find
something, but hopefully that'll help you for now.

--- Shinji Kuwayama <shinji at kuwayama.com> wrote:
> on 6/11/01 2:10 PM, sarah at disaster7 at yahoo.com
> wrote:
> > Where is this titletext string you are talking
> about?
> > 
> > I assume what's happening is on the first pass you
> > change something to <a
> href="#link#">#keyword#</a>,
> > but on the second pass it'll repeat and change it
> to
> > <a href="#link#"><a
> href="#link#">#keyword#</a></a>?
> > 
> > Is that so?
> Yes - with "titletext" I meant to refer to the
> #link# string. Yes, that is
> what happens; when it loops around, it replaces
> strings inside the #link#,

Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

More information about the thelist mailing list