in reply to Regex to parse a date
That seems to do the trick, but you might also want to check out some of the Date and Time modules for more advanced datetime munging.my $dt = "2003 % 05 % 1720:55:23"; my $date = sprintf "%d-%02d-%02d", $dt =~ /(\d+) % (\d+) % (\d{2})/; print "date - $date\n"; __output__ date - 2003-05-17
_________
broquaint
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Regex to parse a date
by MD (Initiate) on May 19, 2003 at 10:18 UTC |