next if defined $Opt{'num'} and $Opt{num} and $Opt{num} != $table_num;
$table = "<>$table</>" unless $T2;
- for my $tr ($table =~ m,<(${T2})${exp2}[^>]*>(.*?)<\s*/\s*${T2}\s*>,gi) {
+ for my $tr ($table =~ m,<(${T2})${exp2}[^>]*>(.*?)<\s*/\s*${T2}\s*>,gi)
+ {
my @col;
print "$table_num " if $Opt{'print-num'};
$tr = "<>$tr</>" unless $T3;
my $count = 0;
+
+ #@_ = $tr =~ m,(<td[^>]*>)\s*<a\s+href="([^"]+)"[^>]*>(.*?)</a>,;
+ #die @_ if @_;
+ $tr =~ s,<td[^>]*>\s*<a\s+href="([^"]+)"[^>]*>(.*?)</a>,<td>$1</td><td>$2,g
+ if $Opt{href};
+
for my $td ($tr =~ m,<${T3}${exp3}[^>]*>(.*?)<\s*/\s*${T3}\s*>,gi)
{
$td = html2txt($td) unless $Opt{html};
=head1 OPTIONS
- -option[tag|T=s] Default: table
+ -option[tag|T=s] table|dl Default: table
+ -option[href!] Treat href as a column
-option[sep|s=s] Default: tab (\t)
-option[html!] Escape html (default: yes)
-option[num|n=i] Only dump table number