From: Stuart Clarke Date: 2009-05-21T20:54:18+09:00 Subject: Re: Case sensitive strings Thanks for a quick reply. I had tried the first one but it didn't work. Did not think of the second one, silly me. Thanks a lot badboy wrote: > Stuart Clarke schrieb: >> I then have a conditional statement to check if a value matches word eg >> >> Many thanks >> >> Stuart > you can use regexes and the "i"-flag: > foo =~ /^yourword$/i > (or better /\Ayourword\Z/i if you're not sure if there are newlines in > it) > or lowercase foo: > foo.downcase == "yourword" > > ;) -- Posted via http://www.ruby-forum.com/.