preg_match_all('/(?<=<th>).*?(?=<\/th>)/',$str,$output);
<?php $content = " <tr> <th>内容1 </th> <th>内容2 </th> </tr>"; $rex = "/<th>(.*) <\/th>/Ui"; preg_match_all($rex, $content, $r); print_r($r[1]); ?>
21,890
社区成员
140,342
社区内容
加载中
试试用AI创作助手写篇文章吧