Hello,
i was trying to get URL's fetched from a file via eregi function. lets assume this was the original html code:
<href="http://www.testing.com/bla/bla111.html"><b><span class="Headline">testing1111aczxc222</span></b></a><br>testing bla bla return true;"
<href="http://www.testing.com/bla/bla222.html"><b><span class="Headline">testing1111aczxc333</span></b></a><br>testing bla bla return true;"
<href="http://www.testing.com/bla/bla333.html"><b><span class="Headline">testing1111aczxc444</span></b></a><br>testing bla bla return true;"
to grab at least the first url i tried to do something like this in the ereg IF statement:
if (eregi('<href=\"(.*)\"><b><span class=\"Headline\">',$line, $data)) {
but as a result i'm getting almost the hole original code, it matches the first <href=" with the LAST "><b><span class="Headline"> in the code, so i'm not getting what i need. How can i make it stop after it found a first match of "><b><span class="Headline"> and not go on untill the last one? how can i fix my code?
Thank you in advance for your help!!