PHP正则表达式匹配多行

可以用修饰符 s 实现多行匹配,很好用。

preg_match_all(‘#pattern.*?pattern#si’, $contents, $matchs);

可以用修饰符 s 实现多行匹配,很好用。

preg_match_all(‘#pattern.*?pattern#si’, $contents, $matchs);

Leave a Reply

Your email address will not be published. Required fields are marked *