From: Adam Akhtar Date: 2008-02-12T08:08:04+09:00 Subject: Re: non case sensitive searching the reg exp. looks good but when i try to apply it to help me romove duplicates from a list it doesnt seem to work list = %w{adam Adam bobby Bobby wild wILd} list.sort list.each_index do |x| list.delete_at(x) if (/list[x]/i =~ list[x+1]) #remove entries which have same spelling but in diff. case end puts "" puts list in this list i consider adam and Adam duplicates because they have the same spelling but only different case. Why doesnt my if clause pick up on this? -- Posted via http://www.ruby-forum.com/.