Genesys Interview Question

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