Home  >  Article  >  Backend Development  >  正则截取html中的一段解决思路

正则截取html中的一段解决思路

WBOY
WBOYOriginal
2016-06-13 12:32:12812browse

正则截取html中的一段

<br />
<html><br />
<body><br />
.........<br />
.........<br />
<ul class="style5"><br />
<li><a href="/profiles/83291221"><img src="/images/252754752" alt="标题标题" />标题标题</a></li><br />
<li><a href="/profiles/83291221"><img src="/images/252754752" alt="标题标题" />标题标题</a></li><br />
<li><a href="/profiles/83291221"><img src="/images/252754752" alt="标题标题" />标题标题</a></li><br />
</ul><br />
........<br />
........<br />
<br />
</body><br />
<br />
</html><br />
<br />
<br />


这样的循环  我要截取第一条,多的不要

  •  正则截取html中的一段解决思路 标题标题
  •  中的"83291221" "标题标题"  这两个,另外把这两个转换成变量  求大神解@@@


    php 正则 截取
    Statement:
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn