I have a string with several HTML tags. I want to remove only the first tag <p>
and the last tag </p>
of this string. I've found solutions that remove all tags but these do not work.
Example:
<p>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
<p> Nullam feugiat, turpis at pulvinar vulputate</p>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
</p>
Should stay:
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
<p> Nullam feugiat, turpis at pulvinar vulputate</p>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit.