I have html code in variable:
$html = '<html>
<a href="http://example.com/extnu/111"></a>
<a href="http://example.com/extnu/222"></a>
</html>';
How do I search for /extnu/ and find the first URL containing that term? So, the result should be
http://example.com/extnu/111;