title: PHP Regex to remove last paragraph and contents
body: <p>I have the following stored in a MySQL table:</p>
  
  <pre><code>&lt;p&gt;First paragraph&lt;/p&gt;&lt;p&gt;Second paragraph&lt;/p&gt;&lt;p&gt;Third paragraph&lt;/p&gt;&lt;div class="item"&gt;&lt;p&gt;Some paragraph here&lt;/p&gt;&lt;p&gt;&lt;strong&gt;&lt;u&gt;Specs&lt;/u&gt;:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Weight:&lt;/strong&gt; 10kg&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;LxWxH:&lt;/strong&gt; 5mx1mx40cm&lt;/p&gt;&lt;p&gt;This is the paragraph I am trying to remove with regex.&lt;/p&gt;&lt;/div&gt;
  </code></pre>
  
  <p>I'm trying to remove the last paragraph tags and content on every row in the table. I can loop through the table with PHP easily enough, but the regex has me stumped.</p>
  
  <p>Every preg_match I've found on stackoverflow either gives me a "preg_match(): Unknown modifier" error, or the var_dump shows an empty array. I believe that would only match the content even if it did work so I think I need preg_replace?</p>
  
  <p>The rows aren't identical in length, but it is always going to be the last paragraph that I want to completely remove.</p>
  
  <p>Would appreciate if someone could show me how. Thanks</p>