in reply to Regex to parse a date

Following the pronciple of KISS

my $s = '2003 % 05 % 1720:55:23'; $s =~ s[(....) % (..) % (..).*][$1-$2-$3]; print $s; 2003-05-17

Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller

Replies are listed 'Best First'.
Re: Re: Regex to parse a date
by TVSET (Chaplain) on May 19, 2003 at 10:43 UTC
Re: Re: Regex to parse a date
by Anonymous Monk on May 19, 2003 at 12:38 UTC
    thanks BrowserUk :-))

    MD