From: Marc Hoeppner Date: 2007-07-20T16:48:09+09:00 Subject: Re: line.split with some complicating factors... > ranges = str.scan(/(\d+)\.\.(\d+)/).map {|a,b| a.to_i..b.to_i } > betweens = str.scan(/(\d+),(\d+)/).map {|a,b| (a.to_i+1)..b.to_i-1 } > > > David Took me a bit, but got it working - perfect, thanks a lot! -- Posted via http://www.ruby-forum.com/.