Balbix Interview Question

String parsing problem, not very difficult