Pergunta de entrevista da empresa Meta

Second round : regular expression with . and * . Given a pattern and input string, check if they are match