From: Chris Chris Date: 2008-07-07T06:42:46+09:00 Subject: .include? for string Hi, I have an array a => [["abc", "def", "ghi|ghi|kl"], ["jkl", "mno", "ghi|pqr"], ["stu", "vwx", "yz|abc"]] Some strings contain the pipe character. I want to delete all the arrows that do NOT contain a certain string. I tried this: a.delete_if { |x| !x.include? "ghi|ghi" } => [] Of course, the array I need would be => [["abc", "def", "ghi|ghi|kl"]] I couldn't figure out a work around. Any wildcards available for string checking in Ruby? Any ideas? Thanks. Cheers, Chris -- Posted via http://www.ruby-forum.com/.