> [POS1, [POS2a, POS2b], POS3, POS4] > [nil, [POS2c, POS2d, POS2e], nil, nil] > Sorry about the syntax. I was just trying to show the array, it was not intended to be ruby code. What Im trying to do is read a text file and then make sense of the data in that text file and store that info in a database. I have managed to sort out into the arrays but need to get the POS2c etc elements into the same array (im guessing thats the best way to do it). For example here is code that im shuffling: 49 7 RP13,RP15,RP17,RP19,RP24, 12X2 33XD Wireless, Independent, 5% 235003410229 Toshiba 7024022000 RP32,RP33 50 4 RP27,RP28,RP30,RP31 10XC4 3X567 Network, Isolated, 5% 2353454310103 Philips 7024010300 51 31 R1,R2,R8,R30,R32,R33,R35, 0603,R10K,1% 0603 3%,1/12W S1345310KFJ2 Bonshui 7563010300 R37,R39,R41,R42,R43,R49, R50,R51,R52,R58,R68,R69, R71,R72,R74,R85,R95,R117, R129,R130,R155,R156,R158, R160 What I've done is split the text up into lines stored all the lines in an array with text.strip.split("\n") But as you can see the R71, R129, the elements in the third column continue on the next line. I need a way to get them into one place. Because those elements that are on the next line are a continuation of the third column element. -- Posted via http://www.ruby-forum.com/.