next if $line !~ /$patterns{$key}->{regex}/; my @captures = map {substr $line, $-[$_], $+[$_] - $-[$_] + 1} 1..$#-;