Pergunta de entrevista da empresa Thomson Reuters

For a given string, find a pattern, use Python or Java