From: jackster the jackle Date: 2008-10-04T09:10:23+09:00 Subject: Iterate through array and delete if match I'm trying to delete elements of an array if they match a string but my code always leaves some matches and I think it's because it's having trouble iterating through the same array it is trying to delete from, is that true? Here is the code: @acl_all_array.each do |range| if range[/access-list/] @acl_all_array.delete(range) puts range end end Is this the correct way to delete matched entries from an array? Thanks John -- Posted via http://www.ruby-forum.com/.