From: GrzechG Date: 2007-06-10T07:35:22+09:00 Subject: Re: parse text with ruby kostas wrote: ... > ================================================================================= > [DEBUG] 5/24/07 5:35:50 PM : Finished to read one line : r 250 1006 -63 > -65 91 -6 -8 319* > [DEBUG] 5/24/07 5:35:50 PM : Successfully opened DB. ... I think that you should tell us some about this log. Eg if '*' character at the end of line appears always in lines what you want analize? (and don't appear in others). The second important thing is a process of cerate log - if date and time format are 'hard coded' or if they use locale? ... > r 250 1019 -61 -83 92 -7 -8 319* to see this info at the output i use two ':' characters with separate char behind it. It looks for me to the 'hard coded' in app. Eg code : logFile = File.new("path to log file") logFile.each do |line| if line =~ /.*:\s.*:\s.*/ line.sub!(/.*:\s.*:\s/,'') puts line end end