So i have some images with several forms like this :
<a href="" class="link-img" alt="">
<img editable="true" style="display: block; cursor: default;" class="main-image"
width="538" height="auto" src="src" alt="large image">
</a>
and like this :
<a href="" class="link link-img">
<img src="src" style="width: 100%; display: block; cursor: pointer;" editable="true"
class="main-image imageLink" width="" height="auto" alt="">
</a>
so my code to select the src image is :
$c = preg_replace('/<a href="(.+)" class="link link-img" alt="(.+)"><img src="(.+)"><\/a>/i'
,'<% link url="$1" caption="<img style=max-width:500px; src=$8 >" html="true" %>',$c);
i tried that several times but the code doesn't worked, so please if someone has any idea i will be very appreciative.

