title: strip images from get_the_content() removes also <p> tags
body: <p>I'm trying to strip all images and the surrounding <code>&lt;a&gt;</code> tag from <code>get_the_content()</code> with this piece of code:  </p>
  
  <pre><code>&lt;?php
  $content = get_the_content();
  $postOutput = preg_replace(array('{&lt;a[^&gt;]*&gt;&lt;img[^&gt;]+.}','{&gt;&lt;/a&gt;}'),'', $content);
  echo $postOutput;
  ?&gt;
  </code></pre>
  
  <p>That works fine, except there are no <code>&lt;p&gt;</code> tags around the paragraphs.<br>
  1. Is this normal when using <code>get_the_content()</code>?<br>
  2. and how could I add them to my result?<br>
  3. Or is my regex wrong?  </p>