Khoros interview question

complete code to validate the regular expression