tom123
08-11-2006, 10:59 AM
I have a date, and am trying to extract the year with a regular expression.
Following code won't work.
The date format:
01-JAN-2006::00:00:00
# Get the start year.
my $date_s = $product[5];
if ($date_s =~ /.{8}(\d\d\d\d)/){
my $date_start = "$1";
}
Please help!
Following code won't work.
The date format:
01-JAN-2006::00:00:00
# Get the start year.
my $date_s = $product[5];
if ($date_s =~ /.{8}(\d\d\d\d)/){
my $date_start = "$1";
}
Please help!