I have the following div:
<div class="myclass"><strong><a rel="nofollow noopener" href="some link">dynamic content</a></strong></div>
and I want to get only the: dynamic content
anchor text.
so far I have tried with preg_match_all
:
"'<div class=\"myclass\">(.*?)</div>'si"
that returns all div content.
I tried to combine it with:
"|<a.*(?=href=\"([^\"]*)\")[^>]*>([^<]*)</a>|i"
that returns anchor text but I cannot make it to work
can someone help?
thank you