title: Replace specific text with a redacted version using Python
body: <p>I am looking to do the opposite of what has been done here:</p>
  
  <pre><code>import re
  
  text = '1234-5678-9101-1213 1415-1617-1819-hello'
  
  re.sub(r"(\d{4}-){3}(?=\d{4})", "XXXX-XXXX-XXXX-", text)
  
  output = 'XXXX-XXXX-XXXX-1213 1415-1617-1819-hello'
  </code></pre>
  
  <p><em><a href="https://stackoverflow.com/questions/16327590/partial-replacement-with-re-sub">Partial replacement with re.sub()</a></em></p>
  
  <p>My overall goal is to replace all <code>XXXX</code> within a text using a neural network. <code>XXXX</code> can represent names, places, numbers, dates, etc. that are in a .csv file.</p>
  
  <p>The end result would look like:</p>
  
  <pre><code>XXXX went to XXXX XXXXXX
  </code></pre>
  
  <p>Sponge Bob went to Disney World.</p>
  
  <p>In short, I am unmasking text and replacing it with a generated dataset using fuzzy.</p>