From: William James Date: 2008-02-12T06:44:56+09:00 Subject: Re: non case sensitive searching On Feb 11, 3:19 pm, 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. >> irb --prompt xmp %w(hello HELLO Hello hellO hell).grep( /hello/i ) ==>["hello", "HELLO", "Hello", "hellO"]