I want to match words from my database and for that i use regular expression to ignore html tags my expression is "
". But it dont handle words comes with apostrophe like Dont't, It's and so on.
Below is the Method that i am using to return the words
private string HighlightSearchKeyWords(string TextToHighlight, string TextAsDiscription, string text)
string ProcessedText = text;
var pattern = keywordPattern(TextToHighlight);
string TagExpression = "<script.*/*>|</script>|<.[^>]*>
But this method return the words with apostrophe also and i want ignore those words
Please suggest what should add in my existing expression so that he handle apostrophe as well.
My problem is i have read all the browser content in a string and now i am trying match list of words with the browser content, when the word match i highlight that word, but word like "abstract or absolute" which come with style tag also get highlight. i want to escape those words that come inside HTML style tag. In order to escape all tag inside script tag i have written "<script.*/*>|</script>|<.[^>]*>" . so i want to add someting in the existing regex expression to escape all style tag.
Waiting for your response.