From: "Boucher, Eric" Date: 2006-02-22T21:52:03+09:00 Subject: A regexp for an include? method Hi, I want to see if a certain pattern is inside an array. I tried: myArray.flatten.include?(/myPattern/) but it always return false. Why? Is it because the "include?" doesn't takes regular expressions? Here's another example that I tried inside an irb session: data = ["TC_TP1", "TC_TP2", "TC_TP3"] =>["TC_TP1", "TC_TP2", "TC_TP3"] data.include?(/TC_TP/) => false data.include?(/TC_TP.*/) => false data.include?(/TC_TP1/) => false data.include?("TC_TP1") => true !!! Thanks for your help.