I need to replace all:
<p class="someClass someOtherClass">content</p>
with
<h2 class="someClass someOtherClass">content</h2>
in a string of content. Basically i just want to replace the "p"
with a "h2"
.
This is what i have so far:
/<p(.*?)class="(.*?)pageTitle(.*?)">(.*?)<\/p>/
That matches the entire <p>
tag, but i'm not sure how i would go about replacing the <p>
with <h2>
How would i go about doing this?