Rexcel has asked for the wisdom of the Perl Monks concerning the following question:
thanks alot!my $maxdate = "2006-06-06"; my $m_year = $maxdate; my $m_month = $maxdate; $m_year =~ s/(^.*)\-.*\-.*/$1/; $m_month =~ s/^.*\-(.*)\-.*/$1/;
Edited by planetscape - added code tags
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Regular expression
by McDarren (Abbot) on Jun 05, 2006 at 06:44 UTC | |
Re: Regular expression
by davido (Cardinal) on Jun 05, 2006 at 06:45 UTC | |
Re: Regular expression
by GrandFather (Saint) on Jun 05, 2006 at 06:55 UTC | |
Re: Regular expression
by ioannis (Abbot) on Jun 05, 2006 at 08:28 UTC | |
Re: Regular expression
by ambrus (Abbot) on Jun 05, 2006 at 09:43 UTC |