Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Can anyone tell me why this regex doesn't work:
Thanks#!/perl/bin/perl.exe -w $date = "20021122"; ($year, $month, $day) = $date =~ m/({.4})({.2})(.*)$/; print "YEAR $year\n"; print "MONTH $month\n"; print "DAY $day\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: RegEx problem
by thelenm (Vicar) on Nov 22, 2002 at 22:25 UTC | |
|
Re: RegEx problem
by Popcorn Dave (Abbot) on Nov 23, 2002 at 05:28 UTC | |
|
Re: RegEx problem
by pg (Canon) on Nov 22, 2002 at 22:38 UTC |