title: With Javascript and regex remove wrapping <p tags from around <img tags
body: <p><strong>Remove wrapping <em>&lt;p</em> tags from around <em>&lt;img</em> tags with Javascript</strong></p>
  <p>Any ideas how to do this with Javascript and not php etc.
  The only example I can find online is with PHP</p>
  <pre><code>preg_replace('​/&lt;p&gt;\s*(&lt;a .*&gt;)?\s*(&lt;img .* \/&gt;)\s*(&lt;\/a&gt;)?\s*&lt;\/p&gt;/iU', '\1\2\3', $content);
  </code></pre>
  <p>Any help / guidance to refactor this into Javascript?</p>
  <p>Many thanks.</p>