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--&gt;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 &quot;meant&quot; 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 &lt;<a href="mailto:netrek at gmail.com">netrek at gmail.com</a>&gt; wrote:<br>&gt; On 7/20/07, Arjun satish &lt;<a href="mailto:arjun.satish at gmail.com">arjun.satish at gmail.com
</a>&gt; wrote:<br>&gt; &gt;<br>&gt; &gt; Can you give an example of the text file and the messages you are looking<br>&gt; &gt; for? Then probably we can you more core info.<br>&gt; <br>&gt; Sure. There is 2 different log formats. I will show each (each
<br>&gt; corresponds to a different type of game server):<br>&gt; <br>&gt; Type 1:<br>&gt; <br>&gt; Server sending PING packets at 2 second intervals 21:51:59<br>&gt; Welcome aboard Ensign! 21:52:00<br>&gt; Sending short packet request 21:52:00
<br>&gt; RSA v2.0 CLIENT 21:52:01<br>&gt; You have very important messages, Captain! 21:52:01<br>&gt; 21:52:01:&nbsp;&nbsp;F5-&gt;ALL&nbsp;&nbsp;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>&gt; )<br>&gt; 21:52:01: GOD-&gt;F5&nbsp;&nbsp; ************* READ THIS ** READ THIS ** READ THIS **********<br>&gt; ********<br>&gt; 21:52:01: GOD-&gt;F5&nbsp;&nbsp; This is a clue server, you MUST read messages on the game<br>&gt; 21:52:01: GOD-&gt;F5&nbsp;&nbsp; To verify, send the answer of the following question to your
<br>&gt; self.<br>&gt; 21:52:01: GOD-&gt;F5&nbsp;&nbsp; How many core planets does each team start with?<br>&gt; 21:52:01: GOD-&gt;F5&nbsp;&nbsp; 1, 5, 10<br>&gt; 21:52:01: GOD-&gt;F5&nbsp;&nbsp; ************************************************************
<br>&gt; ********<br>&gt; Sending variable and short packets.&nbsp;&nbsp;21:52:01<br><br>-- <br>And it&#39;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