I have a string that looks like so:
<p class="thumbnail"><img src="/media/2905/260x150.gif" alt="260x150"
width="260" height="150" rel="260,150" /></p>
The variables are the image, the src, alt tag, width etc. They could all change.
I'm trying to write a regex that will match whether there is a <p/>
tag with a css class of thumbnail and a child node of <img/>
, and if so, replace the string to be:
<p><img class="thumbnail" src="/media/2905/260x150.gif" alt="260x150"
width="260" height="150" rel="260,150" /></p>
I quite simply, am hopelessly lost with the regex! Can anyone provide any pointers, or even a solution?