From: "James F.Hranicky" Date: 2002-08-29T06:18:02+09:00 Subject: Re: Newbie converting brain from perl On Thu, 29 Aug 2002 05:31:23 +0900 "William Pietri" wrote: > date = "28 Aug 2002" > day, month, year = /(\d+) (\w+) (\d+)/.match(date)[1..3] > > But that final [1..3] thing seems inelegant, which makes me think I'm > barking up the wrong tree. What's the best Ruby-style way to do this? In 1.7, you can use String#match as well: all, date, month, year = date.match(/\d+) (\w+) (\d+)/) Jim