0
<span class="fwb">Harry and David</span>
<span class="fcg">Business Intelligence Developer/Analyst</span>
<span class="fcg">Oct 1998 to present</span>
<span class="fcg">Medford, Oregon</span>
<span class="fsm fwn fcg">Creative writing</span>
In my html content
<span class="fwb"> occured more than 4 times,
<span class="fcg"> occured more than 10 times,
<span class="fsm fwn fcg">Creative writing</span> occured more than 5 times.
使用php reg表達式或DOMDocument()我需要替換所有要附加的符號。使用符號或符號替換HTML標籤值
對於前:
<span class="fwb">Harry and David</span> to be replaced by <span class="fwb">Harry and David$</span>
<span class="fcg">Business Intelligence Developer/Analyst</span> to be replaced by <span class="fcg">Business Intelligence Developer/Analyst$</span>
正則表達式工作,並解決了我的問題。 Domdocument顯示錯誤DOMDocument :: saveHTML()期望完全爲0的參數,1在/var/www/fbcrawl/testing.php中給出的第20行。給出一個最好的鏈接學習abt reg表達式 – 2011-12-14 06:32:21