Pergunta de entrevista da empresa Sauce Labs

A Leetcode easy question, check string with pattern