Frage im Vorstellungsgespräch bei Bloomberg

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