가능한 중복 :
How to parse and process HTML with PHP?preg_match()를 사용하여 텍스트를 추출하는 방법은 무엇입니까?
내가 1. 
에서 <div
로 시작하는 텍스트를 추출하는 변수 $new
<div class="img">
<span style="float:left; color:#666;">1. </span>
<a href="/Books/info/J-R-R-Tolkien/The-Lord-of-the-Rings/0618640150.html?utm_term=lord+of+the+ring_1_1">
<img src="http://cdn-img-b-tata.infibeam.net/img/6a53fabc/157/0/9780618640157.jpg?wid=90&hei=113" width="90" height="113" border="0">
</a>
</div>
<span class="title">
<h2 class="simple"><a href="/Books/info/J-R-R-Tolkien/The-Lord-of-the-Rings/0618640150.html?utm_term=lord+of+the+ring_1_1"><em>Lord</em> of the <em>Rings</em></a></h2>
By
<a href="/Books/search?author=J R R Tolkien" style="font-size:12px; text-decoration:none;">J R R Tolkien</a>
<span style="color:#666666; font-size:11px;">[Paperback 2005, 50th Edition]</span>
</span>
<div class="price" style="line-height:30px;margin-top:0px;">
내가 가진에 저장된 텍스트 다음있다. 가능한 모든 솔루션을 시도했지만 성공하지 못했습니다.
빌리가 사실입니다. 특히 preg_match가 필요한 함수가 아닌 경우 부울을 반환하기 때문에. 네가 많이 해보지 않은 것 같아. – Jerska
REGEX로 HTML을 파싱 하시겠습니까? s/(?
[strip_tags] (http://php.net/strip_tags) – dualed