This worked: ^(.+)\1$ replacing it by \1
^(.+)\1$
\1
Still don't get why ^(.+)(?=\1)$ doesn't work.
^(.+)(?=\1)$