Pregunta de entrevista de Bloomberg

Write a code to determine if a pattern exists in a string.