title: Regular Expression for Extension of File
body: <p>I need 1 regular expression to put restrictions on the file types using it's extension.  </p>
  
  <p>I tried this for restricting the file type of html, .class, etc.</p>
  
  <ol>
  <li><code>/(\.|\/)[^(html|class|js|css)]$/i</code></li>
  <li><code>/(\.|\/)[^html|^class|^js|^css]$/i</code></li>
  </ol>
  
  <p>I need to restrict a total of 10-15 types of files. In my application there is a field for accepted file type, and according to the requirement I have file types which is to be restricted. So I need a regular expression using negation of restricted file type only.</p>
  
  <p>The plugin code is like:</p>
  
  <pre><code>$('#fileupload').fileupload('option', {
              acceptFileTypes: /(\.|\/)(gif|jpe?g|png|txt)$/i
  });
  </code></pre>
  
  <p>I can specify the acceptedFileType but i have given the requirement to restrict a set of file.</p>