title: help with regular expression pattern to extract some text from html in C#
body: <p>I have this html block:</p>
  
  <pre><code>&lt;tr&gt;
  &lt;th colspan="2" valign="middle"&gt;some text&lt;/th&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td class="row1"&gt;lalala&lt;span&gt;dadada&lt;/span&gt;&lt;/td&gt;
  &lt;td class="row2"&gt;&lt;input name="unwantedinput"&gt;&lt;/td&gt;
  &lt;/tr&gt;
  
  &lt;th colspan="2" valign="middle"&gt;some text&lt;/th&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td class="row1"&gt;nanana&lt;span&gt;bababa&lt;/span&gt;&lt;/td&gt;
  &lt;td class="row2"&gt;&lt;input name="unwantedinput"&gt;&lt;/td&gt;
  &lt;/tr&gt;
  
  
  &lt;tr&gt;
  &lt;th colspan="2" valign="middle"&gt;Some other text&lt;/th&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td class="row1"&gt;(this text needs to be extracted)&lt;/td&gt;
  &lt;td class="row2"&gt;&lt;input name="myUniqueInput"&gt;&lt;/td&gt;
  &lt;/tr&gt;
  
  &lt;tr&gt;
  &lt;th colspan="2" valign="middle"&gt;some text&lt;/th&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td class="row1"&gt;lalala&lt;span&gt;dadada&lt;/span&gt;&lt;/td&gt;
  &lt;td class="row2"&gt;&lt;input name="unwantedinput"&gt;&lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>what I need is to extract only the data between the "(this text needs to be extracted)".. here is what I've done so far:</p>
  
  <pre><code>&lt;th[^&gt;]*&gt;(.*?)&lt;input[^&gt;]*name="myUniqueInput"[^&gt;]*&gt;
  </code></pre>
  
  <p>the problem with this pattern. its matching the whole text from the beginning till the "myUniqueInput"..
  any idea how to fix this?
  thanks in advance..</p>