From: "Jan E." Date: 2012-07-19T20:04:56+09:00 Subject: Re: Is there some seach algorithm available Hi, So you're looking for the name with "deal" or "bitte" in it? Then you could do something like person_list.each do |name| return name if name.split.any? do |name_part| ['deal', 'bitte'].any? {|keyword| name_part.casecmp(keyword) == 0} end nil end This will split the name on spaces and check if any part is "deal" or "bitte", ignoring the letter case. If there's any match, this name is returned. If no name matches, nil is returned instead (you may also use person_list.first or so). -- Posted via http://www.ruby-forum.com/.