title: Python - Removing unknown 10 character string
body: <p>Im using a modified version of Eric Bidelman's/HTML5Rocks cachebust.py file for css/js. <a href="https://github.com/html5rocks/www.html5rocks.com/blob/master/scripts/cachebust.py/" rel="nofollow">link is here</a></p>
  
  <p>Instead of appending timestamp like</p>
  
  <pre><code>.css?2012-07-30
  </code></pre>
  
  <p>I modified variable to - </p>
  
  <pre><code>cachebust = ''.join(random.choice(string.ascii_uppercase + string.digits) for x in range(10))
  </code></pre>
  
  <p>so it becomes (for example)</p>
  
  <pre><code>.css?6SKD39SFJ3
  </code></pre>
  
  <p>his original version didnt seem to remove the date either, so im not really sure how that is a 'cache control' but i figured if i could just auto-strip those 10 characters, it would work. first targeting any js files (for new files), then if js? (with cachecontrol already in place), strip that existing cachecontrol</p>
  
  <pre><code>asset = re.search('\.(js")&gt;&lt;\/script&gt;', line)
  if asset is not None:
    existing = re.search('\.(js?"', line)
    if existing is not None:
      line[i] = line.replace('.js?'STRING????'"', '.js"')
    lines[i] = line.replace('.js"&gt;&lt;/script&gt;', '.js?%s"&gt;&lt;/script&gt;' % cachebust)
  </code></pre>
  
  <p>thoughts on what that STRING???? should be, or if this method wouldnt work? im new to python so im just experimenting here...</p>