Home: Perl Programming Help: Regular Expressions:
Find and Replace



smdhtv
New User

Nov 27, 2011, 5:21 PM


Views: 10206
Find and Replace

How do i find this code using a regular expression?
note that the url can consistently change so i need to use a wildcard. Thanks in advance.


Code
<div class="tweetmeme_button" style="float: right; margin-left: 10px;"> <a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fjumpinblack.com%2F2011%2F11%2F25%2Fdrake-and-rick-ross-you-only-live-once-ep-mixtape-2011-download%2F"><br /> <img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fjumpinblack.com%2F2011%2F11%2F25%2Fdrake-and-rick-ross-you-only-live-once-ep-mixtape-2011-download%2F&amp;source=jumpinblack1&amp;style=compact&amp;b=2" height="61" width="50" /><br /> </a> </div>



wickedxter
User

Nov 30, 2011, 2:57 PM


Views: 10043
Re: [smdhtv] Find and Replace

look in to this module

http://search.cpan.org/~podmaster/HTML-LinkExtractor-0.13/LinkExtractor.pm

it will extract all the links.