Peter Fleck <[EMAIL PROTECTED]> writes: > >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.)
Peter, You should probably also look at the Date::Parse module, it can parse dates like those described above. -RN -- Robin Norwood Red Hat, Inc. "The Sage does nothing, yet nothing remains undone." -Lao Tzu, Te Tao Ching -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]