Hi all,
I've been trying unsuccessfully to get the text from html page. Html
tag that I'm interested in looks like this:
<a class=link
href="http://www.something.c om/_something.php? type=cart">Shop ping
Cart</a>
<div><em class=newentry> <a href=http://nothing.com>New
Age</a></em></div>
good with RE. I tried this:
$lines = file_get_conten ts("http://theabovetag.com/page.html");
preg_match_all( "/(<a\ class\=link\ href\=(.*)>)(<\/a>)/", $lines,
$matches1);
The above RE gives me "Shopping Cart" plus "New Age" as well. I just
want "Shopping Cart". What am I doing wrong? My RE is somehow ignoring
</atag right after Shopping Cart and instead accepting </aafter New
Age. Please help!
I've been trying unsuccessfully to get the text from html page. Html
tag that I'm interested in looks like this:
<a class=link
href="http://www.something.c om/_something.php? type=cart">Shop ping
Cart</a>
<div><em class=newentry> <a href=http://nothing.com>New
Age</a></em></div>
>From the above tag, I want to extract "Shopping Cart". I'm not very
$lines = file_get_conten ts("http://theabovetag.com/page.html");
preg_match_all( "/(<a\ class\=link\ href\=(.*)>)(<\/a>)/", $lines,
$matches1);
The above RE gives me "Shopping Cart" plus "New Age" as well. I just
want "Shopping Cart". What am I doing wrong? My RE is somehow ignoring
</atag right after Shopping Cart and instead accepting </aafter New
Age. Please help!
Comment