title: Regex for file extensions, how to understand it
body: <p>In the <strong>jQuery-File-Upload</strong> and its basic-plus.html demo there is a regex for the file extensions. </p>
  
  <p><code>/(\.|\/)(gif|jpe?g|png)$/i</code></p>
  
  <p><code>(gif|jpe?g|png)$/i</code> - second part is obvious matches particular file extensions, case-insensitive.</p>
  
  <p>But what about this part : </p>
  
  <pre><code> (\.|\/)
  </code></pre>
  
  <p>Decimal point is one character, <strong>|</strong> matches either the first or the second part ? </p>
  
  <p>jQuery-File-Upload <a href="https://github.com/blueimp/jQuery-File-Upload/blob/master/basic-plus.html" rel="nofollow">basic-plus.html</a></p>