title: Regular Expression for FileTypes
body: <p>I'm using an application which has the following line in it:</p>
  
  <pre><code>ACCEPT_FILE_TYPES = re.compile('image/(gif|p?jpeg|(x-)?png)')
  </code></pre>
  
  <p>Obviously, it limits uploads to <strong>images</strong> of the specified extensions. But I plan to use it for uploading these formats (perhaps even more than that)</p>
  
  <ul>
  <li><em>Microsoft Office files</em> (.doc, .docx, .xls, .xlsx, etc.)</li>
  <li><em>Adobe Reader</em> (.pdf)</li>
  <li><em>And probably archives</em> (.rar, .zip, .7z)</li>
  </ul>
  
  <p>I guess it needs to be rewritten to the following form:</p>
  
  <pre><code>ACCEPT_FILE_TYPES = re.compile('/(docx?|xlsx?|pdf|rar|zip|7z)')
  </code></pre>
  
  <p>Any help would be appreciated.</p>