]+id=.?(Footer|Nav).*$/$1/si;
return $data;
}
sub table_to_hash
{
my (%args) = @_;
my $key_col = $args{key};
my $labels = $args{labels} || die "Need labels";
my $table = $args{table} || die "Need table";
my %hash = ( );
foreach my $line (@$table)
{
my %h = ( );
my $key = $line->[$key_col];
for (my $i = 0; $i < @$labels; $i++)
{
$h{$labels->[$i]} = $line->[$i] if ($labels->[$i]);
}
$hash{$key} = \%h;
}
return \%hash;
}
sub table
{
my ($data) = @_;
if ($data =~ /