本文介绍了PHP preg_replace BESbswy ckeditor的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否可以使用正则表达式来匹配此字符串?整个字符串由p标签包裹,最后2个由强标签包裹。
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
BESbswyBESbswyBESbswyBESbswyBESbswyBESbswy
谢谢!
推荐答案
是的,就是
这样的东西
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) ?>
这篇关于PHP preg_replace BESbswy ckeditor的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!