http://www.auctionarms.com/search/displayitem.cfm?itemnum=9736364&oh=216543에서 "Florida (FL)"을 추출하려고합니다. 내 코드는 preg_match, regexp, php, 텍스트를 HTML에서 추출
//get location $pattern = "/(State)</i>:</td>(.*)</td>/"; preg_match_all($pattern, $htmlContent, $matches); print_r($matches);왜 작동하지 않는지 알 수 있습니까?
이것은 계속 변함없는 것처럼 보입니다. 가능한 경우 html을 구문 분석하기 위해 regexp를 사용하지 마십시오. 그 일을위한 도구가 아닙니다. –