<?php 
 
$test = <<<TEST
<p>First paragraph</p>
<p>Second paragraph</p>
<p>Third paragraph</p>
TEST;

preg_match('/(<p>)([^<]*)<\/p>$/', $test, $matches);

var_dump($matches);

?>