my $dt = "2003 % 05 % 1720:55:23";
$dt =~ /^(\d{4}) % (\d{2}) % (\d{2})/;
$date = "$1-$2-$3";
print "$date\n";
You'll need to change this one if the day of month can have one digit instead of two (i.e. 7 instead of 07).
Michele. In reply to Re: Regex to parse a date
by arthas
in thread Regex to parse a date
by MD
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |