in reply to Match 2 same characters

Can't it be achieved through regular expressions?