From: Daniel Harple Date: 2006-02-27T22:43:50+09:00 Subject: Re: string contains one of these??? On Feb 27, 2006, at 2:35 PM, mikkel wrote: > now, the hard way (more code, less thought) would be to iterate the > array and do a ~= on it...but is there a simpler way ??? How about: leagues = %w{1D 2D U16 U19 LR RR JNL NL} words = "some stuff NL is chunky".split leagues.select { |m| words.include?(m) } # => ["NL"] -- Daniel