Hi all,
I'm having trouble trying to figure out the best approach to this problem and I believe regular expressions are the way to go.
Basically I have created a large string of XHTML using a WYSIWYG editor,
so the string is like "<p>dfdsfjhds <img src='temp.jpg' />
dsfdsfsd</p><p>dfsdfsdfsd</p> ... "
What I want to do is the following...
When SAVING the string to the database I want to replace:
<img class="tmceImg" alt="" src="image.jpg" />
with...
<div class="cnt_tmceImg_left">
<div class="inner">
<img class="tmceImg" alt="" src="image.jpg" />
<p class="sub_text detail">my picture</p>
</div>
</div>
...
Go to the complete details ...