Apple interview question

it was a regular expression question classic one