[thelist] regex for highlighting search terms in coldfusion

Joshua Olson joshua at waetech.com
Fri Jan 27 14:33:04 CST 2006


> -----Original Message-----
> From: Sarah Adams
> Sent: Friday, January 27, 2006 3:06 PM
> 
> > http://concepts.waetech.com/replace_inner_text/
> 
> Now, I don't suppose you know how to make it maintain the 
> case of terms when they are replaced? For example, if I run the 
> string "My name is Sarah" through the highlighting function, with 
> "sarah" as my search term, how do I keep it from replacing 
> "Sarah" with "sarah"?

Sarah,

It shouldn't be too difficult to add that logic to the cfloop that loops
through the occurances.

<><><><><><><><><><>
Joshua L. Olson
WAE Tech Inc.
http://www.waetech.com/
Phone: 706.210.0168 
Fax: 413.812.4864

Monitor bandwidth usage on IIS6 in real-time:
http://www.waetech.com/services/iisbm/





More information about the thelist mailing list