Pergunta de entrevista da empresa CME Group

Q: Given a string, find the largest substring with pattern.