No subject
Mon May 28 02:02:21 UTC 2007
time. Write an API which provides you these logs one line at a time (if its
not previously available). Discard the timestamp from the lines you are
interested in with strchr
<http://www.cplusplus.com/reference/clibrary/cstring/strchr.html>
The separate the sender-->receiver part . The remaining data in the line is
the statements spoken.
I am not really recommending RegEx as the strings provided here as the data
to be parsed seems quite simple and "meant" to be parsed :-) Though you can
always use them or even Python as suggested by David.
Hope this helps.
Arjun
On 7/21/07, Zach <netrek at gmail.com> wrote:
> On 7/20/07, Arjun satish <arjun.satish at gmail.com> wrote:
> >
> > Can you give an example of the text file and the messages you are
looking
> > for? Then probably we can you more core info.
>
> Sure. There is 2 different log formats. I will show each (each
> corresponds to a different type of game server):
>
> Type 1:
>
> Server sending PING packets at 2 second intervals 21:51:59
> Welcome aboard Ensign! 21:52:00
> Sending short packet request 21:52:00
> RSA v2.0 CLIENT 21:52:01
> You have very important messages, Captain! 21:52:01
> 21:52:01: F5->ALL Ensign Yoda is now F5 (
Yoda at pitts-69-72-109-139.dynamic-dial
> )
> 21:52:01: GOD->F5 ************* READ THIS ** READ THIS ** READ THIS
**********
> ********
> 21:52:01: GOD->F5 This is a clue server, you MUST read messages on the
game
> 21:52:01: GOD->F5 To verify, send the answer of the following question
to your
> self.
> 21:52:01: GOD->F5 How many core planets does each team start with?
> 21:52:01: GOD->F5 1, 5, 10
> 21:52:01: GOD->F5
************************************************************
> ********
> Sending variable and short packets. 21:52:01
--
And it's whispered that soon, if we all call the tune,
Then the piper will lead us to reason
And a new day will dawn for those who stand long
And the forest will echo with laughter
http://freeshells.ch/~phoenix
------=_Part_112402_29133559.1185029176019
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Well,<br><br>From the looks of it, you may get these logs from a server one line at a time. Write an API which provides you these logs one line at a time (if its not previously available). Discard the timestamp from the lines you are interested in with
<a href="http://www.cplusplus.com/reference/clibrary/cstring/strchr.html">strchr </a><br><br>The separate the sender-->receiver part . The remaining data in the line is the statements spoken.<br><br>I am not really recommending RegEx as the strings provided here as the data to be parsed seems quite simple and "meant" to be parsed :-) Though you can always use them or even Python as suggested by David.
<br><br>Hope this helps.<br><br>Arjun<br><br>On 7/21/07, Zach <<a href="mailto:netrek at gmail.com">netrek at gmail.com</a>> wrote:<br>> On 7/20/07, Arjun satish <<a href="mailto:arjun.satish at gmail.com">arjun.satish at gmail.com
</a>> wrote:<br>> ><br>> > Can you give an example of the text file and the messages you are looking<br>> > for? Then probably we can you more core info.<br>> <br>> Sure. There is 2 different log formats. I will show each (each
<br>> corresponds to a different type of game server):<br>> <br>> Type 1:<br>> <br>> Server sending PING packets at 2 second intervals 21:51:59<br>> Welcome aboard Ensign! 21:52:00<br>> Sending short packet request 21:52:00
<br>> RSA v2.0 CLIENT 21:52:01<br>> You have very important messages, Captain! 21:52:01<br>> 21:52:01: F5->ALL Ensign Yoda is now F5 (<a href="mailto:Yoda at pitts-69-72-109-139.dynamic-dial">Yoda at pitts-69-72-109-139.dynamic-dial
</a><br>> )<br>> 21:52:01: GOD->F5 ************* READ THIS ** READ THIS ** READ THIS **********<br>> ********<br>> 21:52:01: GOD->F5 This is a clue server, you MUST read messages on the game<br>> 21:52:01: GOD->F5 To verify, send the answer of the following question to your
<br>> self.<br>> 21:52:01: GOD->F5 How many core planets does each team start with?<br>> 21:52:01: GOD->F5 1, 5, 10<br>> 21:52:01: GOD->F5 ************************************************************
<br>> ********<br>> Sending variable and short packets. 21:52:01<br><br>-- <br>And it's whispered that soon, if we all call the tune,<br>Then the piper will lead us to reason<br>And a new day will dawn for those who stand long
<br>And the forest will echo with laughter<br><br><a href="http://freeshells.ch/~phoenix">http://freeshells.ch/~phoenix</a><br>
------=_Part_112402_29133559.1185029176019--
More information about the linuxCprogramming
mailing list