PHP preg_replace BESbswy ckeditor

我的梦境 提交于 2019-12-11 09:19:25

问题


is it possible to match this string with using regex? The whole string is wrapped with p tags and last 2 with strong tags.

BESbswyBESbswyBESbswyBESbswy BESbswy BESbswy

Thanks!


回答1:


yes, it is, something like this

<?php $string = '<p>BESbswyBESbswyBESbswyBESbswy<strong>BESbswy</strong><strong>BESbswy</strong></p>' ?>

<?= preg_replace('|<p>BESbswyBESbswyBESbswyBESbswy<strong>BESbswy</strong><strong>BESbswy</strong></p>|','aa',$string) ?>


来源:https://stackoverflow.com/questions/26118999/php-preg-replace-besbswy-ckeditor

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!