Pergunta de entrevista da empresa Cruise

Given a string of desired matching words and special characters with certain functions, parse some given string and determine if it matches all the criteria.