Try this:

   <CFSET TargetString = "Now is the time for all good men and WOMEN...">
   <CFSET SearchString = "mEn">

   <CFSET TargetString = ReReplaceNoCase(TargetString, "(#SearchString#)",
                                       "<FONT COLOR=red>\1</FONT>", "ALL")>
   <CFOUTPUT>
   <BR>#TargetString#
   </CFOUTPUT>

HTH

Dick

At 2:08 PM -0400 8/16/00, Eli Shechter wrote:
>Hi
>
>i am using the replace function with a search interface,
>
>that when the results come out, if the search word is within the results, to
>turn that word "red"
>
>However,
>it replaces the word with a Red version of the search_word
>#ReplaceNoCase(Description, Search_Word, theReplacedWord , 'ALL')#
>
>the problem with this is that it replaces the Case of the word with the case
>of the Search_word, Meaning if i search "pens" it will replace a instance of
>the word "Pens" (uppercase) with the search_word version.
>
>is there a way to search for the word and just replace the color without
>replacing the word??
>
>Thanx
>-Eli-
>
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to