Well the question title explains the question :D but here is an example none the less
asdf
asdf
<p>asdf
asdf
asdf</p>
how to i get it to regex the inside of the p tags and apply nl2br to it so the output would be:
asdf
asdf
<p>asdf<br />
asdf<br />
asdf</p>
Edit: In PHP