title: How to compare two files containing many long strings then extract lines with at least n consecutive identical chars?
body: <p>I have 2 large files each containing long strings separated by newlines in different formats. I need to find similarities and differences between them. The Problem is that the formats of the two files differ.</p>
  
  <p>File a: </p>
  
  <pre class="lang-none prettyprint-override"><code>9217:NjA5MDAxNdaeag0NjE5NTIx.XUwXRQ.gat8MzuGfkj2pWs7z8z-LBFXQaE:dasda97sda9sdadfghgg789hfg87ghf8fgh87
  </code></pre>
  
  <p>File b: </p>
  
  <pre class="lang-none prettyprint-override"><code>NjA5MDAxNdaeag0NjE5NTIx.XUwXRQ.gat8MzuGfkj2pWs7z8z-LBFXQaE
  </code></pre>
  
  <p>So now I want to extract the whole line containing <code>NjA5MDAxNdaeag0NjE5NTIx.XUwXRQ.gat8MzuGfkj2pWs7z8z-LBFXQaE</code> from File a to a new file and also delete this line in File a.</p>
  
  <p>I have tried achieving this with meld and got to the point that it will at least show me the similarities only. Say File a has 3000 lines and File b has 120 lines, now I want to find the the lines with at least n consecutive identical chars and remove these from File a.</p>
  
  <p>I found <a href="https://stackoverflow.com/questions/1059848/vimdiff-how-to-extract-similar-lines-in-files-and-output-them-to-a-file">this</a> and accordingly tried to use diff like this:</p>
  
  <pre class="lang-sh prettyprint-override"><code>  diff  --unchanged-line-format='%L' --old-line-format='' \
    --new-line-format='' a.txt b.txt
  </code></pre>
  
  <p>This didn't do anything I got no output whatsoever so I guess it exited with 0 and didn't find anything.</p>
  
  <p>How can I make this work? I have Linux and Windows available.</p>