说我有
$content = "some text [again < dummy1>< /dummy1> some te < dummy2>< /dummy2>< /dummy3>xt] keep theses < needkeeped>xxx< needkeeped>"
我想删除所有标签< dummyx>
,但是,我只想为标签女巫在[
和]
字符之间做
预期的结果是
$content = "some text [again some text] keep theses `< needkeeped>xxx< needkeeped>"`
我试过了
preg_replace('/<[^>]*>/', '', $content)
但它删除了所有标签