title: Regex for identifying version numbers - Python
body: <p>I need to find and replace version numbers within text with a generic placeholder e.g. '*'.</p>
  
  <p>Problem is writing the regex that would capture the version numbers.</p>
  
  <hr>
  
  <p>Some examples:</p>
  
  <pre><code>Mozilla/5.0 (X11; Linux i686) AppleWebKit/535.1 (KHTML, like Gecko) Ubuntu/11.04 Chromium/14.0.825.0 Chrome/14.0.825.0 Safari/535.1
  
  Mozilla/5.0(iPad; U; CPU iPhone OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B314 Safari/531.21.10gin_lib.cc
  
  Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-PT; rv:1.9.2.7) Gecko/20100713 Firefox/3.6.7 (.NET CLR 3.5.30729)
  </code></pre>
  
  <hr>
  
  <p>Version numbers contain:</p>
  
  <ul>
  <li>alphanumeric characters</li>
  <li>special characters i.e. '.-_:'</li>
  </ul>
  
  <p>A simple regex might be <code>r'[0-9._:-]+'</code> but this does not work as version number needs at least 1 alphanumeric chars and special character in between alphanumeric characters.</p>
  
  <hr>
  
  <p>Any ideas?</p>