Yahoo interview question

Regular expression question