title: Text alignment: extracting matching sequence using python
body: <p>My goal is to extract the aligned matching sequence in two text passages. Next are my texts:</p>
  
  <pre><code>txt1='the heavy lorry crashed into the building at midnight'
  txt2='what a heavy lorry it is that crashed into the building'
  </code></pre>
  
  <p>Expected output:</p>
  
  <pre><code>'heavy lorry'
  'crashed into the building'
  </code></pre>
  
  <p>My attempt:</p>
  
  <pre><code>def sequ(s1,s2):
      _split1=s1.split()
      _split2=s2.split()
      _match=''.join(list(set(_split1) &amp; set(_split2)))
      return _match
  
  print sequ(txt1, txt2)
  
  Result: heavybuildingintocrashedthelorry
  </code></pre>
  
  <p>......distorted result.</p>
  
  <p>Any suggestions as to how to arrive at the expected result?
  Thanks. </p>