From: 7stud -- Date: 2012-09-10T05:11:00+09:00 Subject: Re: Need help with my logic given_server = "DK-vk-2.domain.lan" server_types = ['vk', 'vh', 'vm'] start, type, the_rest = given_server.split('-') puts type --output:-- vk other_two = (server_types - [type]).map do |new_type| [start, new_type, the_rest].join('-') end p other_two --output:-- ["DK-vh-2.domain.lan", "DK-vm-2.domain.lan"] -- Posted via http://www.ruby-forum.com/.