title: Highlight key words in a given search text
body: <p>I'm using following method to highlight the keywords in a given text.</p>
  
  <pre><code>private string HighlightSearchKeyWords(string searchKeyWord, string text)
          {
              Regex keywordExp = new Regex(@" ?, ?");
              var pattern = @"\b(" + keywordExp.Replace(Regex.Escape(searchKeyWord), @"|") + @")\b";
              Regex exp = new Regex(pattern, RegexOptions.IgnoreCase | RegexOptions.Singleline);
              return exp.Replace(text, @"&lt;span class=""search-highlight""&gt;$0&lt;/span&gt;");
  
          }
  </code></pre>
  
  <p>Sample Text: "What is .net Programming? Pl suggest few e-books"</p>
  
  <p>Keyword: ".net"</p>
  
  <p>When i try to search with key word ".net" .net is not getting highlighted in the given sample text.</p>
  
  <p>When i try to search with key word "e-books" e-books is getting highlighted in the given sample text.</p>
  
  <p>What would be the problem. Can anyone pl let me know where exactly do i need modify/</p>