title: Shortest match in Regex
body: <p>This is my regex:</p>
  
  <pre><code>/&lt;strong&gt;.*ingredients.*&lt;\/ul&gt;/im
  </code></pre>
  
  <p>Assuming the source code:</p>
  
  <pre><code>&lt;strong&gt;Contest closes on Thursday May 10th 2012 at 9pm PST&lt;/strong&gt;&lt;/div&gt;
  &lt;br /&gt;
  &lt;br /&gt;
  &lt;br /&gt;
  * I am not affiliated with Blue Marble Brands or Ines Rosales Tortas in any way.&amp;nbsp; I am not sponsored by them and did not receive any compensation to write this post...I just simply think the&amp;nbsp;Tortas&amp;nbsp;are wonderful!&lt;br /&gt;
  &lt;br /&gt;
  &lt;div class="separator" style="clear: both; text-align: center;"&gt;
  &lt;a href="http://1.bp.blogspot.com/-35J5vNrXkqE/T6htXTafrmI/AAAAAAAAA5E/g2mtiuSpSmw/s1600/food+003.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="480" mea="true" src="http://1.bp.blogspot.com/-35J5vNrXkqE/T6htXTafrmI/AAAAAAAAA5E/g2mtiuSpSmw/s640/food+003.JPG" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
  &lt;br /&gt;
  &lt;strong&gt;&lt;span style="font-size: large;"&gt;Ingredients:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
  &lt;ul&gt;
  &lt;li&gt;Ines Rosales Rosemary and Thyme Tortas&lt;/li&gt;
  &lt;li&gt;Pizza Sauce (ready made in a jar)&lt;/li&gt;
  &lt;li&gt;Roma Tomatoes&lt;/li&gt;
  &lt;li&gt;Roasted Red Peppers &lt;/li&gt;
  &lt;li&gt;Marinated Artichoke Hearts&lt;/li&gt;
  &lt;li&gt;Olives (I used Pitted Spanish Manzanilla Olives)&lt;/li&gt;
  &lt;li&gt;Daiya Vegan Mozzarella Cheese&lt;/li&gt;
  &lt;/ul&gt;
  &lt;span style="font-size: large;"&gt;&lt;strong&gt;Directions:&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;
  &lt;br /&gt;
  Spread small amount of pizza sauce over Torta. 
  </code></pre>
  
  <p>the Regex is greedy and grabs everything from <code>&lt;strong&gt;Contest...&lt;/ul&gt;</code> but the shortest match should yield <code>&lt;strong&gt;&lt;span style="font-size: large;"&gt;Ingredients...&lt;/ul&gt;</code></p>
  
  <p>this is my gist: <a href="https://gist.github.com/3660370" rel="nofollow">https://gist.github.com/3660370</a></p>
  
  <p>::EDIT::
  Please allow flexibility inbetween strong tag and ingredients, and ingredients and ul.</p>