abangbatax
asked on
simple question perl coding
this source :
<br><a href='http://www.oracle.com/technology/obe/11gr1_db/appdev/php/files/errors.php' class='link_small'>http://www.oracle.com/technology/obe/11gr1_db/appdev/php/files/errors.php</a></t d></tr>
how to crop in perl
the one statred from class='link_small'> and ended with </a>
resulted to this :
http://www.oracle.com/technology/obe/11gr1_db/appdev/php/files/errors.php
i have tried using this code:
$link =~ m/class=\'link_small\'?>http:\/\/(.+?)\<\ /a>/g
is that correct? or any accurate coding?
<br><a href='http://www.oracle.com/technology/obe/11gr1_db/appdev/php/files/errors.php' class='link_small'>http://www.oracle.com/technology/obe/11gr1_db/appdev/php/files/errors.php</a></t
how to crop in perl
the one statred from class='link_small'> and ended with </a>
resulted to this :
http://www.oracle.com/technology/obe/11gr1_db/appdev/php/files/errors.php
i have tried using this code:
$link =~ m/class=\'link_small\'?>http:\/\/(.+?)\<\
is that correct? or any accurate coding?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
That depends on what you want. If the content (what is in $link) can have the desired text appear multiple times, and you want to get all of them, then yes - use the /g.
ASKER
thank you for your help!
ASKER
do i need it?
i am scripting a web link grabber... based on keyword
should i add /g ?