but will pick it up without the embedded html...<A HREF="path/name"><FONT SIZE=-1>path name</FONT></A>
Here is the Perl script:<A HREF="path/name">path name</A>
$/ = ""; $raw = ""; $linktext = ""; %atts = (); while (<>) { while (/<A\s([^>]+)>([^<]+)<\/A>/ig) { $raw = $1; $linktext = $2; $linktext =~ s/[\s]*\n/ /g; while ($raw =~ /([^\s=]+)\s*=\s*("([^"]+)"|[^\s]+\s*)/ig) { if (defined $3) { $atts{ uc($1) } = $3; } else { $atts{ uc($1) } = $2; } print '-' x 15; print "\nLink text: $linktext\n"; foreach $key ("HREF", "NAME", "TITLE", "REL", "REV", "TARGET") { if (exists($atts{$key})) { $atts{$key} =~ s/[\s]*\n/ /g; print " $key: $atts{$key}\n"; } } %atts = (); } } }
In reply to Extracting information by oaklander
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |