title: Finding shortest regex match in HTML
body: <p>I would like to match the last column in the first row from the following HTML:
   (this is just an example)</p>
  
  <pre><code>&lt;tr&gt; &lt;td&gt; ABC &lt;/td&gt; &lt;td&gt; DEF &lt;/td&gt; &lt;td&gt; ABC &lt;/td&gt; &lt;/tr&gt; 
  &lt;tr&gt; &lt;td&gt; GHI &lt;/td&gt; &lt;td&gt; JKL &lt;/td&gt; &lt;td&gt; GHI &lt;/td&gt; &lt;/tr&gt;
  </code></pre>
  
  <p>So what I want to match is: <code>&lt;td&gt; ABC &lt;/td&gt; &lt;/tr&gt;</code></p>
  
  <p>I tried toying around with regex101.com but I just can't find a proper way to match the last <code>&lt;td&gt;</code> from the first row only. </p>
  
  <p>What I got so far is the following regex: <code>(&lt;td&gt;).*?(&lt;\/tr&gt;)</code> which matches </p>
  
  <p><code>&lt;td&gt; ABC &lt;/td&gt; &lt;td&gt; DEF &gt;/td&gt; &lt;td&gt; ABC &lt;/td&gt; &lt;/tr&gt;</code> though.</p>
  
  <p>Is there any way to match only the shortest string between <code>&lt;td&gt;</code> and <code>&lt;/tr&gt;</code> ? (I found similar questions but can't figure out a solution to this one.)</p>