This is off the top of my head and there may be a more elegant solution to 
this but you can do something like this

<CFSET thisVar = "<b>myworldisking</b>everythingelse">
<CFSET keyVal = "<b>myworldisking</b>">
<CFSET newVar = 
#left(thisVar,len(keyVal))#&"<i>"&#mid(thisVar,len(keyVal)+1,len(thisVar)-len(keyVal))#&"</i>">

Now I understand that you have to do this on the fly and would not have all 
the cfsets etc, but I think you can incorporate this logic into a UDF or 
custom tag where you parse the entire text and supply one word at a time to 
the tag or UDF, or you can do it in one go with the REPLACE function 
incorporating all the logical steps into one big attribute, not a very 
elegant solution though.

One other thing, why don't you write the corrected thing to the DB? This 
would seem alot more efficient than having to parse the text each time it is 
retrieved and displayed, that way you only have to do the changes when the 
values in the DB is changed.


HTH

Donnie Bachan
Phone: (718) 217-2883
ICQ#: 28006783
"Nitendo Vinces - By Striving You Shall Conquer"
======================================================================
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited. If you received
this in error, please contact the sender and delete the material from any
computer.


______________________________________________________________________
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to