From: Peter Szinek Date: 2007-09-28T20:58:13+09:00 Subject: Re: regex: capture groups and term binding Simon Mullis wrote: > Hi Peter, > > This is a good idea... I wasn't clear in my original post but the > problem is that some of the lines have 3 (\d+), some 4 and some 5. > Also, there are 4 different groups of data sprinkled through a load of > log files. Could you please give an example of how the expected result looks like for the above dataset? Possibly it's not my day, but I still didn't get what are you trying to accomplish :-) The result of my solution was: [["1", "100000436", "3441863", "1550663", "1161254", "951982"], ["1", "479903531056", "47988002622", "21360568539", "18276299303", "15476234490"], ["1", "66934", "5552", "321640438", "40297830", "0"], ["1", "0", "3235", "2197", "10907", "1631621"], ["1", "15488078", "210564267", "574075997", "2405132745", "7805716381"], ["1", "0", "4949", "0", "58361", "0"]] How does the result you are expecting differ from the above one? Cheers, Peter __ http://www.rubyrailways.com http://scrubyt.org