我有一个 wordpress 网站,其中包含大量带有以下标记的帖子:
<div class="comments container">[song_comments song_slug="this time"]</div>
我想要一个正则表达式搜索/替换模式,它将搜索任何字符串,如
<div class="comments container">[song_comments XXXXXXXXXXXXXXXXXXX</div>
...并将其替换为空字符串。
所以左分隔符是
<div class="comments container">[song_comments
...并且正确的分隔符是
</div>
之间的一切都是可变的。
关于如何做到这一点的任何想法?