Click here to Skip to main content
15,886,919 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,
I am creating IE BHO, and the functionality of the BHO is to highlight the matched words, everyting is running fine, except i issue. My problem is i have a word "DON" and on the IE browser there is word "Don't". i want to ignore word "don't" from highlighting, but it part of don't i.e. don get highlight.

I have use the below function to ignore the words


C#
if (Regex.IsMatch(PageText, string.Format(@"\b({0})\b", TextToHighlights)))
                        {
                            
                            lst.Add(TextToHighlights);
                        }


In Pagetext, we have all the words from browser
and
TextToHighlights: in this we send words 1 by 1 to match in loop


Please help me to solve this issue.


Thanks
AP
Posted
Updated 19-Feb-13 19:46pm
v2

1 solution

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900