fixing regexes for questions 5 and 6