title: How can I match HTML elements with regular expressions?
body: <p>The following codes does not work, I am trying to retrive TR strings from a HTML table. Is there any issue with this code or any other solution available?</p>
  
  <pre><code>public static List&lt;string&gt; GetTR(string Tr)
  {
      List&lt;string&gt; trContents = new List&lt;string&gt;();
  
      string regexTR = @"&lt;(tr|TR)[^&lt;]+&gt;((\s*?.*?)*?)&lt;\/(tr|TR)&gt;";
  
      MatchCollection tr_Matches = Regex.Matches(Tr, regexTR, RegexOptions.Singleline);
      foreach (Match match in tr_Matches)
      {
          trContents.Add(match.Value);
      }
  
      return trContents;
  }
  </code></pre>
  
  <p>Sample input string is given below:</p>
  
  <pre><code>"&lt;TR&gt;&lt;TD noWrap align=left&gt;abcd&lt;/TD&gt;&lt;TD noWrap align=left&gt;SPORT&lt;/TD&gt;&lt;TD align=left&gt;5AT&lt;/TD&gt;&lt;/TR&gt;"
  </code></pre>