Domanda di colloquio di Apple

it was a regular expression question classic one