JPMorganChase Interview Question

String manipulation question: given a string where some characters are stars, and a second string, return the lexicographically smallest string that can be obtained by replacing the stars such that the second string is its substring.