At 10:14 +0000 3/7/13, John Delacour wrote:
>On 06/03/2013 15:58, Nick wrote:
>
>>Thanks, that did exactly what I was looking for. But, I realized I also need 
>>to do this for anchor tags with relative links, such as:
>><a href="/xxx/yyyyyyyy/zzzzzzz.shtml">ordinateur de bureau</a>
>
>A text filter something like this should do everything you want provided you 
>haven't got more than one URL per line.
>
>#!/usr/bin/perl
>use strict;
>my $f = "/tmp/url.txt";
>open my $fh, ">", "$f" or die $!;
>while (<>) {
>    /href ?= ?"([^"]*)"/ and print $fh "$1\n";
>   print;
>}
>`open -a "bbedit" $f`;


The link at the top starts with a slash meaning it's a complete URI.  But mots 
links on a site will not be like that. They will have an implied BASE as a 
starting point.  It might be the initial URL that got you to the site or it 
might be explicitly set in the HTML code.  You will need to save that 
information and apply it to the list of links you're getting.  That's not 
usually what a text editor is expected to do.

-- 
-->A flashlight: is a metal tube used to store dead dry cells. <--

-- 
-- 
You received this message because you are subscribed to the 
"BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
<http://groups.google.com/group/bbedit?hl=en>
If you have a feature request or would like to report a problem, 
please email "[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>

--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to