Find multiple patterns with a single preg_match_all in PHP

后端 未结 4 458
独厮守ぢ
独厮守ぢ 2021-01-01 04:49

Using PHP and preg_match_all I\'m trying to get all the HTML content between the following tags (and the tags also):

paragraph text

don\'t
4条回答
  •  春和景丽
    2021-01-01 05:31

    This one work for me

    preg_match_all("#<\b(p|ul|table)\b[^>]*>(.*?)#si", $content, $matches)
    

提交回复
热议问题