我有我需要從一段文字刪除此要求這個空如何刪除使用正則表達式和PHP
標籤。
<p><span> </span></p>
例如
<p><span>Because the coffee grinds stay in the pod there is virtually no cleaning either.</span></p>
<p><span> </span></p>
<p><span>Hey presto, your coffee, your way every time. </span></p>.
我試圖刪除空
<p></p>
使用正則表達式
$pattern1 = "/<p[^>]*><\\/p[^>]*>/";
我應該如何修改這個刪除的空標籤
<p><span> </span></p>
有什麼原因,你不能只是刪除字符串'
嗨,是的,我已經刪除str_replace.yaa我沒有想過 – user993516 2014-09-10 15:10:55