From: James Edward Gray II Date: 2006-05-05T21:33:26+09:00 Subject: Re: Newbie question On May 5, 2006, at 7:27 AM, Kyle Alons wrote: > Given an array like > > ["&abc", "a&cb", "b&ac", "ccc", "cb&a"] > > what is the Ruby way to construct an array containing only elements > with > duplicate characters following the &'s? In this case > > ["&abc", "b&ac", "cb&a"] >> ["&abc", "a&cb", "b&ac", "ccc", "cb&a"].grep(/&../) => ["&abc", "a&cb", "b&ac"] Hope that helps. James Edward Gray II