Detection of similar segments of two signal
You could use correlation between the two signals or a matched filter in which you set the filter coefficients as the samples from the selected segment inverted in time. In matlab it would be something like

coef = knownSegment (end:-1:1,:);

minSize = length(other_signal) + length(knownSegment) - 1;
N = 2^nextpow2(minSize);
OUT = ifft(fft(other_signal,N).*fft(coef,N));


Then you find the maximum value of variable OUT and at that point in time the two signals are most similar