From: Robert Klemme Date: 2006-02-23T02:53:34+09:00 Subject: Re: A regexp for an include? method semmons99@gmail.com wrote: > What about using: > data.match(/TC_TP/) > should return nil if it doesn't match, otherwise returns the matching > string. It doesn't return the matching string but an object of type MatchData. The matched string can be extracted from that. Another form is to use String#[] with regexp, like arr.any? {|s| s[/TC_TP/]} Kind regards robert