Well I'm back from my cave, with another question

.
Ive been working hard on my pacman(don't laugh), and have started with many level related things, I have decided a good exercise for me would be for my game to read level files, instead of having them built in. I haven't decided on making a level editor or not, but I'm sure of how I want this file to be set up. I need to be able to store a few different things(Ghosts, walls position and size, player start, dots etc) and they need to be neatly set up like so
command position,size
like,
wall 2 - 3,1 -5
player start 7 - 7
place dot 5 - 5
I know how to write and read files(somewhat) but in a very limited manner, I need to know how to not just detect for a whole word on one line, but a specific part of a line, say a comma , or set of numbers, then another and know what each is for. But that's not all, if you know anything good about handling files please share, I need info!
Thanks in advanced!
Your about to get pwned.
