Text Parser - how to

P

pritywiz

I am a very beginner in c. I have to write a text parser to parse a
file with certain fields, a special delimiter.

This file may be in network, and may have to acces from the network.
Any help
 
R

ramasubramanian.rahul

hi...
what is the delimiter... what is the format in which the file is to be
written...be specific.... people will help only if u be specific ...
 
C

Clever Monkey

pritywiz said:
I am a very beginner in c. I have to write a text parser to parse a
file with certain fields, a special delimiter.
Then you better get busy. Since your requirements are so secret it
looks like you best write some code and then show us.
This file may be in network, and may have to acces from the network.
Any help
Start simple. Leave networking out of it for now, and just concentrate
on your logic against a test file.
 
P

pritywiz

At the moment I really dont know, but wanted to give an initial start,
actually I am a PHP programmer and have done such parsing a lot.

But currently we have a requirement in C. I just want you all to give
me a beginner link or a basic code how to achieve this.

For example, if I have an attribute value pair data with each attribute
and value separated by '-' dash and the pair separated by a
semicolon';' and each new record in a new line.

Then if I want this in a database table -- which is also a task after I
parse the text, I should be able to do it.

Prity
 
I

iuz

pritywiz said:
At the moment I really dont know, but wanted to give an initial start,
actually I am a PHP programmer and have done such parsing a lot.

But currently we have a requirement in C. I just want you all to give
me a beginner link or a basic code how to achieve this.

if you are familiar to PHP.. ask yourself how PHP parses php files?
but i think that you need a simple parser so try to write some code and then
come back..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top