title: Wordpress/PHP replace caption tag with div
body: <p>I have this </p>
  
  <p><code>[caption]&lt;img /&gt;[/caption]</code></p>
  
  <p>I have removed the caption tags usign this </p>
  
  <p><code>$content = preg_replace("/\[.*?\]/", "", $content);</code></p>
  
  <p>However, I want to replace it with div like this</p>
  
  <p><code>&lt;div&gt;&lt;img&gt;&lt;/div&gt;</code></p>
  
  <p>What I am missing? Any help is appreciated.</p>