MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: coloring only some substring


Perhaps a little less cryptic is the following:

lst={"to","be","or","not","to","be","bottom"}

lst /. "to" -> StyleForm["to", FontColor -> RGBColor[0, 0, 1]]


Steve Luttrell wrote:
> lst={"to","be","or","not","to","be","bottom"}
> 
> lst /. "to" -> "\!\(\* StyleBox[\"to\",FontColor->RGBColor[1, 0, 0]]\)"
> 
> Steve Luttrell
> 
> <fartous at mail15.com> wrote in message news:d0jtph$mvg$1 at smc.vnet.net...
> 
>>hi
>>i have the list:
>>lst={"to","be","or","not","to","be","bottom"}
>>how to search for the string "to" and then to output the whole content of 
>>List
>>lst but with the substring "to" colored in red.
>>thanks
>>
>>jack
>>
> 
> 
> 


  • Prev by Date: InitializationCell
  • Next by Date: Re: RationalApproximation
  • Previous by thread: Re: coloring only some substring
  • Next by thread: coloring only some substring