/^(.{4}).*\1$/ # ^ and $ match beginning and end of string respectively