Nikola Janceski wrote at Wed, 31 Jul 2002 17:27:22 +0200: > $\ = "\n"; > $date = "20020731"; > print join "/", ($date =~ /(\d{4})(\d{2})(\d{2})/)[1,2,0]; # this works > print join "/", ($date =~ /(\d{4})(\d{2}){2}/)[1,2,0]; # this doesn't > > __END__ > > why did the second pattern not capture the second occurance of \d{2} ? > Is this the correct action? or should it capture the second one in the > second example?
The second pattern matches only these 12 days in a year: Jan 01 Feb 02 Mar 03 Apr 04 May 05 Jun 06 Jul 07 Aug 08 Sep 09 Oct 10 Nov 11 Dec 12 Cheerio, Janek -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]