From: Robert Klemme Date: 2008-02-12T06:29:57+09:00 Subject: Re: non case sensitive searching On 11.02.2008 22:19, Adam Akhtar wrote: > If i want to see if a list contains a particular word how would i go > about doing so with letter case not being important. Normally two words > spelt the same are not equal if they differ in case. > > i.e. Shell != shell > or ShEll != shell > > At first i thought simply conveting both the list and the word to search > into uppercase thus making them the same but doing so would not be very > efficient if the list is very big. search_key = something.downcase list.find {|s| s.downcase == search_key} robert