From: Kyle Alons Date: 2006-05-06T04:06:21+09:00 Subject: Re: Newbie question 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). -- Posted via http://www.ruby-forum.com/.