m{ ([A-Za-z]) # find a letter (and capture it) \1 # followed by the same (?!\1) # but not by the same again }x;