$tag_regex=array(
'/\<p(\s*)\>(.*?)\<\/p\> /si' => "$1",
'/\<(\s*)(*.?)class\=(*.?)\>(.*?)\<\/(*.?)\>/si' => "$3"
);
$paragraphs=preg_replace(array_keys($tag_regex),ar ray_values($tag_regex),$page);
I am not sure what tag is that you mean on <class="something">, but in this
RE .. it should capture any <p> tags (the first element of the array) and
any tags (the second element of the array) that has attribute class on it.
You can find another example of this kind of HTML parsing in the PHP... try
googling it..
HTH
--
View this message in context: http://www.nabble.com/Re%3A-Regex-to-catch-%3Cp%3Es-tp17075329p17089906.html
Sent from the PHP - General mailing list archive at Nabble.com.