Thomson Reuters interview question

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