<table style="display:block"><tr><td><div> </div></td></tr><tr style="display:block;">
正则提取出table或tr标签,如:<table style="display:block">,标签属性不固定,有多少就要多少,<table ...>
在线等,谢谢
------解决方案--------------------
preg_match_all再用str_replace
------解决方案--------------------
- PHP code
$str =<<<eof<table style="display:block"><tr><td><div> </div></td></tr><tr style="display:block;"><tr style="display:block;">eof;preg_match_all('#<(table|tr)[^>]+(?=")[^>]+>#is',$str,$m); print_r($m[0]);