PHP正则匹配查看原图解决方法
时间:2021-07-01 10:21:17
帮助过:10人阅读
PHP正则匹配查看原图
哪位高手帮忙写个正则匹配内容:
$str='内容内容内
容内容内容内容内容内容

内容内容内容

';
匹配效果:
$str='内容内容内
容内容内容内容内容内容

原图内容内容内容

原图';
分享到:
更多
------解决方案--------------------$str = '内容内容内
容内容内容内容内容内容
内容内容内容
';
echo preg_replace('//is', '$0原图', $str);
内容内容内
容内容内容内容内容内容

原图内容内容内容

原图