From: Chris Kalaboukis Date: 2010-02-12T07:49:35+09:00 Subject: Delete Item In Array If Conditions Met Hi all: Ruby newbie here. Been trying to get this code to work but am having a tough time of it. Can anyone else please help me out? I've read from a db into an array, and would like to go through the array and remove elements which match a specific criteria. Here is the code that I'm using: # load array @array = Capture.find(:all) # iterate through array for x in @array x.reject!{|x| x.text =~ "something"} end -- Posted via http://www.ruby-forum.com/.