I'm not really good with regexes so I need some help here.  I have a 
simple search page which searches a table containing a keyword and 
description.  I want to implement highlighting which was simple.  
However, I need to enhance it slightly.

For example, if the user searches for "architect" results are also 
returned for "architectural" and "architecture".  This doesn't need to 
change.  However, I do a simple ReplaceNoCase() to highlight the 
string.  So, only "architect" is highlighted when the whole word is 
actually "architectural" or "architecture." 

What I need is some kind of UDF or REGEX which will allow me to only 
highlight "architect" if that is the entire word but if "architect" is 
really part of a larger word it would not get highlighted. 

I found a highlight UDF on cflib.org but am not especially good with 
regexes so I'm not sure what sequence to be looking for.  Also, I would 
like to search for more than just a space before and after the word.  So 
if the word is hyphenated (i.e. "architectural-style" it would still 
highlight "architecture".

Jake


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:257809
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to