I am trying to wrap all img
tags in my output text:
$output = '<p>some text <img src=""> some text <img src=""></p>
<p>some text <img src=""> some text <img src=""></p>';
I need it to be:
$output = '<p>some text <figure><img src=""><figcaption>blah blah</figcaption></figure> some text <figure><img src=""><figcaption>blah blah</figcaption></figure></p><p>some text <figure><img src=""><figcaption>blah blah</figcaption></figure> some text <figure><img src=""><figcaption>blah blah</figcaption></figure></p>';
Can I do that with regexp?