title: Remove HTML tag with C#
body: <p>I have problem with prepare String using Regex.
  I wrote this function:</p>
  
  <pre><code>    private String parseAnswer(String res)
      {
          String[] pattern = new String[16] { "&lt;head[^&gt;]*?&gt;.*?&lt;/head&gt;", "&lt;style[^&gt;]*?&gt;.*?&lt;/style&gt;", "&lt;script[^&gt;]*?.*?&lt;/script&gt;", "&lt;object[^&gt;]*?.*?&lt;/object&gt;", "&lt;embed[^&gt;]*?.*?&lt;/embed&gt;", "&lt;applet[^&gt;]*?.*?&lt;/applet&gt;", "&lt;noframes[^&gt;]*?.*?&lt;/noframes&gt;", "&lt;noscript[^&gt;]*?.*?&lt;/noscript&gt;", "&lt;noembed[^&gt;]*?.*?&lt;/noembed&gt;", "&lt;/?((address)|(blockquote)|(center)|(del))", "&lt;/?((div)|(h[1-9])|(ins)|(isindex)|(p)|(pre))", "&lt;/?((dir)|(dl)|(dt)|(dd)|(li)|(menu)|(ol)|(ul))", "&lt;/?((table)|(th)|(td)|(caption))", "&lt;/?((form)|(button)|(fieldset)|(legend)|(input))", "&lt;/?((label)|(select)|(optgroup)|(option)|(textarea))", "&lt;/?((frameset)|(frame)|(iframe))" };
          String[] replacement = new String[16] { " ", " ", " ", " ", " ", " ", " ", " ", " ", "\n$0", "\n$0", "\n$0", "\n$0", "\n$0", "\n$0", "\n$0" };
  
          for (int i = 0; i &lt; pattern.Length; i++)
          {
              res = Regex.Replace(res, pattern[i], replacement[i]);
          }
  
          return res;
      }
  </code></pre>
  
  <p>This function get code of HTML as input. I want to clear some of HTML tags. To do it I prepare array of pattern. But it appear that my function doesn't clear code of HTML.
  My patterns are list of HTML tag which I want to remove. Some of tags I don't remove but only add \n.</p>
  
  <p>Can you help me with this Regex? Or give me any library to do it task? My aim is remove HTML tag to receive only text of website to parse.</p>
  
  <p>EDIT:
  Ok I can use HTMLAgilityPack but I have a few questions:
  htmlDoc.LoadHtml(URL); - I need to translate result to UTF8 -> HTMLAgilityPack have any function to convert? 
  Second generally I want to result of InnerText put to Json and send it to Javascript.
  How I can remove char with are forbidden in Javascript?</p>