[LCP] input needed
arjun.satish at gmail.com
Fri Jul 20 11:50:07 UTC 2007
Try to use regular expressions to group your text. There are many libraries
which give you Reg Exp support. If the text you are looking for always
occurs at a certain point in a line, just use the plain getline and then use
string apis like strchr and strtok to extract your data.
Can you give an example of the text file and the messages you are looking
for? Then probably we can you more core info.
On 7/20/07, Zach <netrek at gmail.com> wrote:
> I would like to write a parser for a game log file (ASCII text). There
> will be many different sorts of text I will need to identify and
> group. I guess I need first to decide on existing sentinels in the
> data I can use. I am wondering what would be the best way to find and
> process the data files. The final output will be a colorized HTML set
> of files with frames, one frame corresponding to each of a 4 different
> message types. A lot of data in the files I will just ignore, I just
> want basically to extract the messages people type to one another and
> to their team, global or personal message boards. So should I just
> read one line at a time or read chunks?
> I heard in C there is a couple different ways I could do this task.
> Any ideas with code snippets or psuedocode would be helpful.
> This is the Linux C Programming List
> : http://lists.linux.org.au/listinfo/linuxcprogramming List
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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the linuxCprogramming