Sean Wei
says to
YSITD
s/(.)\1(..)/$2$1$1