Find the original string, without the repetition without the repetition in the middle
Perl 6, 40 bytes

{.subst: m:ex/(.*))&gt;$0/.max(*.chars),''}


Try it

{
  .subst:             # substitute


    m                 # match
    :exhaustive
    /
      ( .* )          # any number of chars

      )&gt;              # don't include the following in what is returned

      $0              # the first match again
    /.max( *.chars ), # find the first longest submatch


    ''                # substitute it with nothing
}