网页采集php preg_match 截取body正则表达式
02/18/2021 | 22:34分类:网络 | 标签:php preg_match | 787 views
要这么写: $preg_var = “/^
(.*+)<\/body>$/is”;之前这么写会出问题:$data=preg_replace(“/^(.+?)(.+?)<\/body>(.+?)$/is”, “$2”, $data);
Hello World
要这么写: $preg_var = “/^
(.*+)<\/body>$/is”;