I think this should be elementary, but I still can't get my head around it. Let's say there's fair amount of HTML documents and I need to catch every image URLs out of them.특정 추출 <a href> URLs out of the document
The rest of the content changes, but the base of the url is always the same for example: http://images.examplesite.com/images/
,
So I want to extract every string that contains that part. the problem is that they're always mixed with <a href=''>
or <img src=''>
tags, so how could I drop them out? preg_match
probably?
가능한 중복 [PHP XPath는 : 바늘을 포함하는 모든 HREF 값을 가져] (http://stackoverflow.com/questions/2392393/php-xpath-get-all-href-values-that-contain- 바늘) – Gordon
또한 [Preg_Match 모두 A href] (http://stackoverflow.com/questions/1519696/preg-match-all-a-href/1519791#1519791)와 같이 DOM을 사용할 수 있습니다. XPath를 링크 된 복제물에 지정된 XPath로 변경하면됩니다. – Gordon
나는 그것에게 시도를 줄 것이다 :) – Seerumi