title: Pattern matching in the end of a string (postgres)
body: <p>Let's say I have the following table (called filetable) with file names: </p>
  
  <pre><code>file
  something.h
  something.cc
  somethingelse.js
  something.py
  something.xkh
  something.jpeg
  </code></pre>
  
  <p>I tried the following query: </p>
  
  <pre><code>select file 
    from filetable
      where file ~ E'\.[cc|h|js|py]';
  </code></pre>
  
  <p>The query output is: </p>
  
  <pre><code>file
  something.h
  something.cc
  somethingelse.js
  something.py
  something.xkh
  something.jpeg
  </code></pre>
  
  <p>However, I only need files that finish exactly with .cc , .h , .js , .py.
  How to improve this query?</p>