in reply to Problem with RegEx & various "endings"
my $group; if ($teststring =~ /^\[(\w+)]/) { $group = $1; } elsif ($teststring =~ /^(\w+)/ { $group = $1; ... [download]