my @dates; my string='All kinds of text 01-01-2003 Perl Party more text 01-01-2004 Perl Party and even more text 01-01-2005 Perl Party and finally some other date 01-01-2006'; if ($string=~/([0-9]{2})-([0-9]{2})-([0-9]{4})\s$/ {my $date="$1\.$2\.$3"; push @dates, %date}}