I have this content:
<h1 class="contf _48_black caphead">
<span>The essence of social media is knowing your audience and engaging them in something they love. In real-time, relevance and resonance! </span>
<a href="https://twitter.com/" target="_blank">
<img class="retwt" src="images/retweet.svg">
</a>
<span class="secmov"><img src="images/arrow.svg"></span>
</h1>
I am trying to extract the content from the h1 TAG as follows but not able to get it.
<?php
$result = <h1 class="contf _48_black caphead">
<span>The essence of social media is knowing your audience and engaging them in something they love. In real-time, relevance and resonance! </span>
<a href="https://twitter.com/" target="_blank">
<img class="retwt" src="images/retweet.svg">
</a>
<span class="secmov"><img src="images/arrow.svg"></span>
</h1>;
preg_match_all('$<h1(.*?)</h1>$i',$result, $subresult);
print_r($subresult);
?>
where as the following works-
preg_match_all('$span>(.*?)</span>$i',$result, $subresult);
Can some one please let me.