PDA

View Full Version : Stripping URL's in Perl



rotis23
07-22-2003, 05:19 AM
Hi all,

Does anyone know of a module (or other method) of stripping URLs out of a file?

I want to pass a file to a function that strips out all the URLs and returns them in an array. This must have been done before.

Any ideas,

TIA, rotis23

rotis23
07-22-2003, 06:48 AM
I've found that a part of the HTML-Parser module, called HTML::LinkExtor can do this, but only with HTML.

I can't find one that will work with any type of file.

Zach L.
07-22-2003, 10:07 PM
Perl has great regular expression support, why not use those.

Casey
07-23-2003, 08:24 AM
>>Does anyone know of a module (or other method) of stripping URLs out of a file?
Yea, CPAN has a module called HTML::LinkExtor that'll do what you want.