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