Khoros Interview Question

complete code to validate the regular expression