Using regular expressions to extract the first image source from html codes?

后端 未结 10 1118
深忆病人
深忆病人 2020-12-05 01:07

I would like to know how this can be achieved.

Assume: That there\'s a lot of html code containing tables, divs, images, etc.

Problem: How can I get matches

10条回答
  •  醉酒成梦
    2020-12-05 01:32

    i assume all your src= have " around the url

    ]+src=\"([^\"]+)\"
    

    the other answers posted here make other assumsions about your code

提交回复
热议问题