We consider matching with shifts for Gibbsian sequences. We prove that the maximal overlap behaves as c.log.n, where c is explicitly identified in terms of the thermodynamic quantities (pressure) of the underlying potential. Our approach is based on the analysis of the first and second moment of the number of overlaps of a given size. We treat both the case of equal sequences (and nonzero shifts) and independent sequences.