title: Ruby, iterating through strings, matching exact patterns and replacing each but the first one
body: <p>I have a column of strings (cities) in a csv file. I'd need to go through the list, iterate through all matching patterns, keep only the first one and replace all similar ones with blank lines.
  I am no programmer, but if I could do this that would help me a lot at work!
  I have notions of Ruby and notions of regexp in Emacs.
  Is this feasible? Can anyone help?</p>
  
  <p>Thank you in advance!</p>
  
  <p><strong>File looks like this</strong>:</p>
  
  <p>Bordeaux</p>
  
  <p>Bordeaux</p>
  
  <p>Paris</p>
  
  <p>Paris</p>
  
  <p>Paris</p>
  
  <p>Riom</p>
  
  <p><strong>File should look like this:</strong></p>
  
  <p>Bordeaux</p>
  
  <p>(blank)</p>
  
  <p>Paris</p>
  
  <p>(blank)</p>
  
  <p>(blank)</p>
  
  <p>Riom</p>