Is there a trick to getting all HTML elements using regular expressions? Take this snippet of HTML, for instance:
<div>
<p>test
<span>blub</span></p>
</div>
in correct order Like:
array(
0=>'<div>
<p>test
<span>blub</span></p>
</div>',
1=>'<p>test
<span>blub</span></p>'
2=>'<span>blub</span>'
)
I thought of something with
(<([A-z]+)[^>]*>.*?</\2>)