Hello friends,
I have the following txt log file ==>
···
=================================================================================
[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.
[DEBUG] 5/24/07 5:35:50 PM : Going to read one line.
[DEBUG] 5/24/07 5:35:50 PM : Going to close DB.
[DEBUG] 5/24/07 5:35:50 PM : Successfully closed DB.
[DEBUG] 5/24/07 5:35:50 PM : Going to open DB.
[DEBUG] 5/24/07 5:35:50 PM : Finished to read one line : r 250 1015 -52
-72 91 -6 -8 319*
[DEBUG] 5/24/07 5:35:50 PM : Going to read one line.
[INFO] 5/24/07 5:35:50 PM : Call RaceField constructor.
[INFO] 5/24/07 5:35:50 PM : Opponent has no record of today.
[DEBUG] 5/24/07 5:35:50 PM : Finished to read one line : r 250 1019 -61
-83 92 -7 -8 319*
[DEBUG] 5/24/07 5:35:50 PM : Going to read one line.
[DEBUG] 5/24/07 5:35:50 PM : Going to close DB.
I would like to parse this file with ruby, and to produce a new txt file
where i have only ==>
r 250 1006 -63 -65 91 -6 -8 319*
r 250 1015 -52 -72 91 -6 -8 319*
r 250 1019 -61 -83 92 -7 -8 319*
How can i do that?
thank you
i am a ruby newbie
kostas
--
Posted via http://www.ruby-forum.com/.