I am developing an ASP.NET application in which I have to display description for text documents after performing SQL full text search query. I have to highlight the user input search string with in description of that document. Now problem is that:
If the user enters rang as input search string then I have to check whether that string is part of another word or appears as an individual word. For example:
1 – rang may appear by itself or it may be part of some word i.e. W*rang*ling.
2 – weep may appear by itself or it may be part of *weep*ing.
How can I validate such condition for strings? Is it possible through Regex.Match()?
Any help will be much appreciated.
NOTE: A single word may appear multiple times in multiple ways within a paragraph.
You can do that in regex