From: joe chesak Date: 2010-03-26T21:12:11+09:00 Subject: Re: All contiguous subsets --000e0cd1059e90b8d90482b31235 Content-Type: text/plain; charset=ISO-8859-1 Thanks guys! Jean-Julien, I'm floored how tailor-made the .each_cons method is for this particular problem. Perfect! Thanks for introducing that to me. Rick, I like your approach. If there are any changes to the requirements, I think your solution would be easy to modifiy for just about any new twist. GF. I mostly agree. I've been long seduced by REGEX and find it a comfort zone. But in this case, there's no contest with the .each_cons. Joe On Thu, Mar 25, 2010 at 11:07 PM, gf <8si.greg@gmail.com> wrote: > Don't be seduced by the idea that everything can be fixed by hitting > it with the regex hammer. Sometimes regex will lead you down a very > dark path when some simple constructs would get you running quickly. > > Jean's sample code is hard to beat for being simple and concise. > > --000e0cd1059e90b8d90482b31235--