Peter Fleck [mailto:[EMAIL PROTECTED]
:
: (
: $date=~/^((\d\d?)\/(\d\d?)\/(((\d{2,2}))|(\d{4,4})))($|(,(\s*)
: ((\d\d?)\/(\d\d?)\/(((\d{2,2}))|(\d{4,4}))))+$)/
: )

What about split:

my @dates = split m#/|,\s*#, 'mm/dd/yy,   mm/dd/yy';
printf "Dates retrieved: %s\n", @dates / 3;


Bit late in responding here... I like using the split() function as a replacement for my monstrous regex. Your example doesn't really validate the entry but you got me thinking about what I can do with the split. (You also forced me to read up on s/printf and scalar context to figure out what the heck you were doing.)


Thanks.
--
Peter Fleck
Webmaster | University of Minnesota Cancer Center
Dinnaken Office Bldg.
925 Delaware St. SE
Minneapolis, MN  55414
612-625-8668 | [EMAIL PROTECTED] | www.cancer.umn.edu
Campus Mail: MMC 806

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



Reply via email to