in this code this line is not working
return ("" + m.Value + "");
suppose m="Delhi"
output screen it is print as "Delhi
public string HighlightText(string InputTxt)
{
string Search_Str = FilterSearchTerms.Text;
// Setup the regular expression and add the Or operator.
Regex RegExp = new Regex(Search_Str.Replace(" ", "|").Trim(), RegexOptions.IgnoreCase);
// Highlight keywords by calling the
//delegate each time a keyword is found.
return RegExp.Replace(InputTxt, new MatchEvaluator(ReplaceKeyWords));
}
public string ReplaceKeyWords(Match m)
{
// return ( m.Value);
return ("" + m.Value + "");
}
Loading

Replies
Know the answer? Post it — somebody with the same question will find it here.