Find duplicates in a string