Microsoft interview question

How would you find repeated patterns in a string