I need to retrieve anchor tag innerHTML using RegExp in php. Consider I have a syntax like
<div class="detailsGray"><span class="detailEmail"><a href="http://example.com"class="fontLink">examples@mail.com</a></span></div>
Try to get it by
preg_match_all('/class=\"fontLink"\>.*\<\/a\>/', $raw, $matches);
but which is not working. Only I need to retrieve examples@mail.com using RegExp and preg_match_all(). Thanks
Use a parser. Luckily, PHP has one!
returns: