Keepsafe Software interview question

Write code to parse a string.