From: Joey Zhou Date: 2011-04-24T22:21:44+09:00 Subject: Re: Can I split the array from text? Maybe you can refer to Enumerable#slice_before Here's a sample code: a = ["Member","Friends","Hello","Components","Family","Lastname"] b = a.slice_before {|elem| elem == "Components" }.to_a p b[0] #=> ["Member", "Friends", "Hello"] p b[1] #=> ["Components", "Family", "Lastname"] Joey -- Posted via http://www.ruby-forum.com/.