Php regular expression to match a div
- by Thoman
Hello
This is mycode
<?php
/**
* @author Joomlacoders
* @copyright 2010
*/
$url="http://urlchecker.net/html/demo.html";
$innerHtml=file_get_contents($url);
//echo $innerHtml;
preg_match_all("{\<div id='news-id-.*d'\>(.*)\</div\>}",$innerHtml,$matches);
//<div id='news-id-160346'>
var_dump($matches);
?>
I want find all content in div id='news-id-160346'. Please help me