我想从网站中提取特定的链接。PHP:使用preg_match_all()获取特定链接
的链接看起来像:
<a href="1494761,offer-mercedes-used.html">
的联系始终是相同的 - 除了名优产品(在这种情况下,奔驰)。
这工作得很好,但迄今为止仅提供链接的第一部分:
preg_match_all('/((\d{7}),offer-)/s',$inhalt,$results);
这与提供整个网站的第一个链接:(
preg_match_all('/((\d{7}).*html)/s',$inhalt,$results);
任何想法?
请注意,我使用preg_match_all()而不是preg_match()。
个感谢, 查马