in reply to Getting the shortest match?

You mean, of all possible matches, find the shortest? There's no such method in Perl. It would be a very costly operation; you'd basically need to backtrack through all possible matches and select the shortest.

Abigail