如何使用正则表达式删除仅一些html标签?

时间:2018-08-19 08:04:31

标签: regex

我有文字

some words <span class="english">some english words</span> some words and more words<br> some more words and more words<p>more words</p><span>more words</span>

我想删除所有标签,除了其中的内容以及

结果必须是

some words <span class="english">some English words</span> some words and more words<br> some more words and more words more words more words 

我使用正则表达式<.*?>删除了所有标签。如何保留<br><span class="english"></span>

0 个答案:

没有答案