From: Clement Ow Date: 2008-06-16T17:37:55+09:00 Subject: Re: array to string conversion Pe単a, Botp wrote: > From: clement.ow@asia.bnpparibas.com > # However, I now encounter another problem.. > # Assuming my hash: > # ex = {} > # ex[0] = [".xls", ".ini", "20080326"] > # ex[1] = ["RVG", ".xls", ".rb"] > # I need to extract the values in each array with the extentions(values > # with periods) into one string and the dir names(values without the > # periods) into another string. I've been tryin to figure out but to no > # avail, is there a clean way to do that? > > Hi Clement, pardon me because i cannot picture the problem. > can you give an example? Hi botp, Assuming I have my hash: ex = {} ex[0] = [".xls", ".ini", "20080326"] ex[1] = ["RVG", ".xls", ".rb"] The result i would want: str1 = [".xls", ".ini", ".xls", ".rb"] str2 = ["20080326", "RVG"] Is there any way i can do this? Thanks. Regards, Clement -- Posted via http://www.ruby-forum.com/.