Grab interview question

String pattern matching