This is a little different from what you have. The current current regular expression will check for pallindromicity (?) From the second character. Since you want to check the entire line, you need to change it a bit:
^(?!.*(.)(.)\2\1)
The first anchor ensures that the check is performed only at the beginning (otherwise, the regular expression may require a match at the end of the line).
Then .* Within the negative forecast will allow you to check anywhere on the line. If there is a match, the entire match cannot be completed.
Jerry source share