Ron Jeffries <ronjeffries / REMOVEacm.org> writes: > >Heh, Ron, how about giving us a failing test so we can work towards > >solving the actual problem? > > That's my problem. I can't formulate a test without getting bogged > down in the string/array/string loop. If I had a test I'd be > done. ;-> OK, so forget about the representation for a second. Write a test that assumes you have some magic objects that do what you want (ie, go up a level of abstraction). What would that test look like? For example, would it be something like: people = MagicList.new("MIron TXdave NCandy NCken") query = MagicList.query("NC") assert_equals(["NCandy", "NCken"], people.intersection(query)) query = MagicList.query("dave") assert_equals(["TXdave"], people.intersection(query)) (Obviously not... but perhaps in correcting these gross inaccuracies we'll be able to iterate somewhere closer to Nirvana). Dave