Guys,
I m working on searching and coloring keywords in the paragraph(string)
I'm using the following way to highlight the search keywords.
It is working fine but also fetches partial words also in the text.
string Keyword = "Sql program"
string text = "My first Asp.net Sql program run Successfully. I love Dotnet Sql programming";
Regex regex1 = new Regex(Keyword,RegexOptions.IgnoreCase)
Match match = regex1.Match(text);
wordcount = regex1.Matches(text .ToString()).Count;
for (int j = 0; j < wordcount; j++)
{
if (match.Success)
{
--colour the text
}
}
I want it should colour 'Sql program' along with if keyword ending with comma(,), fullstop(.) in the text
but not the '**Sql program**ming'
i tried :
1. @"\b(" + string.Join("|", Keyword ) + @")\b"; ----- No Success
Kindly proide me the s ...
Go to the complete details ...