Meta interview question

Recursively parse a string for a pattern that can be either 1 or 2 characters long.