What are you doing withe the strings next?

You might want to have a look at StringScanner.