preg_replace how to do that?
<p>So I occured one problem. I got a code -</p>

<pre><code>[caption id="attachment222" align="aligncenter" width="520" caption="caption ghoes here"]&lt;img class="image-caption" title="title" src="picture link goes here" alt="" width="520" height="328" /&gt;[/caption]
</code></pre>

<p>So basically what I need to do is go through $content, get each <code>&lt;img&gt;</code> src that is inside [caption][/caption] tags, for more info, see the code above, and insert the src link inside caption and remove the img tag, so in the end it would look like <code>[caption id="attachment222" align="aligncenter" width="520" caption="caption ghoes here" url="picture link goes here"][/caption]</code> .</p>

<p>AS you can see, the src is changed to url too. Hope you can help me with this.</p>
