On May 5, 2006, at 2:06 PM, Kyle Alons wrote: > James Gray wrote: >>>> ["&abc", "a&cb", "b&ac", "ccc", "cb&a"].grep(/&../) >> => ["&abc", "a&cb", "b&ac"] >> >> Hope that helps. > > That's not quite it. That seems to match all strings containing an > ampersand followed by 2 other characters. What I need is all strings > that have duplicate characters following an & (&a in the above). > Something a little more concrete: > > ["&File", "&Edit", "Vi&ew", "P&roject", "T&ree", "Favo&rites", > "&Help"] > > would return > > ["&Edit", "Vi&ew", "P&roject", "T&ree", "Favo&rites"] > > (&e and &r are found multiple times). No letters are duplicated in "&Edit". I clearly don't understand your goal, but you solve it like this: array_of_strings.select do |string| # put test against string here... end Sorry I am not more help. James Edward Gray II