From: Dave Thomas Date: 2001-11-23T13:36:21+09:00 Subject: [ruby-talk:26193] Re: regex/split/scan question (was: Re: Linux Magazine article) Jos Backus writes: > > > to do this. But I'm looking for a replacement in the succinct > > > > > > ($ext) = $mbox =~ /.*?-(.+)$/; > > > ($ext2) = $ext =~ /.*?-(.+)$/; How about ext, ext2 = /-(.*?-(.*))/.match(mbox).to_a[1,2] That's fairly succinct :) Dave