Nope, Try cluster patterns , so rewrite $day,$month,$year as
$day="(?:[12]?[0-9]|30|31)";
etc ....



>From: "Rum Pel" <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: grouping regex match return values
>Date: Wed, 18 Sep 2002 00:17:44 -0400
>
>
>I want to pick dates from a file, I did it the following way:
>-----
>$day = "([12]?[0-9]|30|31)";
>$weekday = "(Mon|Tue|Wed|Thu|Fri|Sat|Sun)";
>$month = 
>"([1-9]|10|11|12|Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)";
>$year = "(1999|2000|2001|2002)";
>
>$query = "$month\/$day\/$year";
>
>@q = "Today is Tue 9/17/2002 Tomorrow is 10/17/2002?" =~ /$query/g;
>print "q = " . Dumper(@q);
>-----
>
>Now, the array q has 6 values - 9, 17, 2002, 10, 17, 2002.
>Instead I want two values only - "9/17/2002", "10/17/2002"
>
>do i need to rewrite my query?
>
>
>
>
>_________________________________________________________________
>MSN Photos is the easiest way to share and print your photos: 
>http://photos.msn.com/support/worldwide.aspx
>
>
>--
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to