开发者

Regex - PHP :: Regex pattern to parse links and images from html page [duplicate]

开发者 https://www.devze.com 2023-01-05 19:56 出处:网络
This question already has answers here: Closed 12 years ago. Possible Duplicates: How do I extract HTML content using Regex in PHP
This question already has answers here: Closed 12 years ago.

Possible Duplicates:

How do I extract HTML content using Regex in PHP

RegEx match open tags except XHTML self-contained tags

Hi,

I dont know regex, i working with PHP (possible use Zend framework)

I need to get from html 开发者_Go百科page images and links. I think the best way to do it with regex, regex pattern that insert images and links to 2 arrays:

  1. linksArray
  2. imagesArray

Please can you help me,

Thanks


This has been asked before. Quite often (example). Regexes are a bad solution. You should use a parser.

0

精彩评论

暂无评论...
验证码 换一张
取 消