Confluent Interview Question

Given a string and a pattern with wildcard, return true if the pattern matches the string