/(.)\1/
booklettercoffee·catdoglemon
Guides
Regex Hunter
Regex backreferences: patterns that remember what they matched
A backreference like \1 matches the exact text a group already captured. Here's how they work, how to find doubled letters, repeated words and palindromes, and the one place they don't work.
Regex Hunter