So what you've done so far?
You try something, post specific questions and problems and we would be glad to help. We won't just give you the answers though. Give it a shot and see what you come up with. substring will probably be helpful here, perhaps split will be as well.