可能重复:
如何使用 PHP 解析和处理 HTML?
您好,我已经抓取了一个网页
<div class="col blue">
<img src="/en/media/Dentalscreenresized.jpg" />
<h4>This is line i want to scrape</h4>
<p class="date">12 Sep
<span class="year">2012</span></p>
<p>13 people were diagnosed with oral cancer after last year’s Mouth Cancer Awareness Day. Ring 021-4901169 to arrange for a free screening on the 19th September.</p>
<p class="readmore"><a href="/en/news/abcd.html">Read More</a></p>
<p class="rightreadmore"><a href="http://www.xyz.ie/en/news/">See all News </a></p>
</div>
现在我想显示的<h4>
标签。class="col blue"
我在网上看到使用preg_match_all()
我不熟悉正则表达式......请帮助