title: regular expression for checking .css file
body: <p>I wanna check the file is css file or not using regular expression.
  I tried </p>
  
  <pre><code>new RegExp(".css$").test("a.css"); //true 
  </code></pre>
  
  <p>but it is matching filename.acss which is correct.
  I want regex to match a valid .css file only. I need following cases .</p>
  
  <pre><code>new RegExp(".css$").test("a.acss"); //false
  new RegExp(".css$").test(".css"); //false
  new RegExp(".css$").test("a.cssa"); //false
  new RegExp(".css$").test("a.css"); //true 
  </code></pre>