title: why does this python regex fail
body: <pre><code>import sys
  import os
  import re
  import numpy as np
  #Tags to remove, sample line:  1:one:2:two:....:122:twentytwo:....:194:ninetyfour:....
  r122 = re.compile(':122:(.):')
  r194  = re.compile(':194:(.):')
  
  if len(sys.argv) &lt; 2 :
      sys.exit('Usage: python %s &lt;file2filter&gt;' % sys.argv[0])
  if not os.path.exists(sys.argv[1]):
      sys.exit('ERROR: file %s not found!' % sys.argv[1])
  with open (sys.argv[1]) as f:
      for line in f:
          line = re.sub(r':122:(.):', '', str(line))
          line = re.sub(r':194:(.):', '', str(line))
          print(line,end=" ")
  </code></pre>
  
  <p>In</p>
  
  <pre><code>1:one:2:two:....:122:twentytwo:....:194:ninetyfour:....
  </code></pre>
  
  <p>Out</p>
  
  <pre><code>1:one:2:two:....:122:twentytwo:....:194:ninetyfour:....
  </code></pre>
  
  <p>the tags 122 and 194 are not removed. what am i missing here ?</p>