in reply to Trouble with regular expression

There are various modules that can help with parsing date and time strings in various formats. You can search CPAN for date time parse. It is big but I have used Date::Manip on many occasions and I belive DateTime and Date::Parse get quite a bit of use these days. You might also find the Perl Date Time Wiki at http://datetime.perl.org/ helpful.