i need to match all div / table block in the web page.
i usually use
but this way went wrong with nested divCode:preg_match_all("/(.*)<(div|table)([^<>]*)>(.*)<\/(div|table)>(.*)/iUs",$s,$m);
~> my code returns with the first </div>Code:<div>a<div>b</div></div>
so, how can i get <div>a<div>b</div></div> (biggest div block) in every situation?Code:<div>a<div>b</div>



Reply With Quote



Bookmarks