$re = '/ <p[^>]*>((?:(?!<\/p>).)+)<\/p>\s*<blockquote[^>]*>(.*?)<\/blockquote>/';
$str = '<p> demo <p>..</p>demo:</p> <p ><img src="http://demo.com/123.jpg" width="100%"/> <br/> <em>Credit: demo2 demo2 </em></p> <p >here1 here1:</p> <blockquote cite="here1"> <p><em>demo3. demo3 demo3 demo3:</em></p> </blockquote> <p >demo4 demo4:</p> <p ><img src="http://demo.com/1234.jpg" width="100%"/> <br/> <em>demo5 demo 5 demo5</em></p> <p >demo6 demo6:</p> <blockquote cite="demo6"> <p><em>demo7 demo7<br/>';
preg_match($re, $str, $matches, PREG_OFFSET_CAPTURE, 0);
// Print the entire match result
var_dump($matches);
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for PHP, please visit: http://php.net/manual/en/ref.pcre.php