title: Remove [caption][/caption] from am string
body: <p>Suppose that I have the string</p>
  
  <pre><code>test [caption id="attachment_13399" align="alignleft" width="240"]&lt;img class="img" src="test.jpg" alt="Test Image" width="240" height="270" /&gt; Test remove capture[/caption] end test
  </code></pre>
  
  <p>I need after preg_replace to show only : <code>test end test</code></p>
  
  <p>But I get <code>test Test remove capture end test</code>.</p>
  
  <p>My regex is : <code>$text = preg_replace('/\[.*?\]/', '', $a_record['content'])</code></p>
  
  <p>Can you help me please ? Thx in advance and sorry for my english</p>