Let's say I have the following code:
<p class="some_class">text</p>
I need to replace it with something like this:
<div class="other_class">
<img src="line.png" class="line">
<span class="comm">text</span>
</div>
I guess that the best way to do this is with regular expressions, but I have no idea how to use them here. I'm using PHP. Basically, I need to match the text wrapped with p tag of specific class, and insert it into the other tags.
Thanks in advance.