Question d’entretien chez Microsoft

How would you find repeated patterns in a string