Current location: Hot Scripts Forums » Programming Languages » Perl » regular expression for parsing url link

regular expression for parsing url link

Reply
  #1 (permalink)  
Old 07-25-05, 05:23 AM
musmanm80 musmanm80 is offline
Newbie Coder
 
Join Date: Jul 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
regular expression for parsing url link

hi
i am parsing an html file to get the all url links.plz any body can tell me the regular expression for extracting a link.for example the link in html file is


<a href="http://www.fastcoolcars.com/" onmousedown="return clk(this.href,'res',1,'')"><b>Fast</b> Cool <b>Cars</b> - <b>Fast</b> <b>Cars</b>,
Cool <b>Cars</b></a>

in this i have need of only http://www.fastcoolcars.com
i wan to get all links and store them in array.but i am not making regular expression for this.plz help me
thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 07-27-05, 11:58 PM
Chas Chas is offline
Coding Addict
 
Join Date: Oct 2003
Location: California
Posts: 359
Thanks: 0
Thanked 0 Times in 0 Posts
That's not a simple regex. I would use HTML::LinkExtractor[1] myself.

~Charlie

[1] http://search.cpan.org/~podmaster/HT...nkExtractor.pm
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Share on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Xml / Dom / Css Mark_SC.SE JavaScript 0 06-29-05 08:05 AM
Regular Expression KHWright Visual Basic 0 06-02-05 06:40 PM
I want a crowler and abstraction from Regular Expression oiranoinu Script Requests 4 11-25-04 11:31 PM
Regular Expression IP Address Replacement CMIVXX PHP 3 11-20-04 07:27 AM
suggest a regular expression gmadhukarreddy Perl 2 01-08-04 12:56 AM


All times are GMT -5. The time now is 07:01 PM.
vBulletin® Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.