Pergunta de entrevista da empresa Genesys

Given a string & Pattern with wildcards check whether that string follows that pattern. Like abcd & a*d.