title: Match strings which do not start or end with
body: <p>How can I test a string if it begins with "files/" and/or ends with ".js"?</p>
  
  <p>Examples: </p>
  
  <ul>
  <li>test/test2/test.html --> true</li>
  <li><strong>files</strong>/test2/test.html --> false</li>
  <li>test/test2/test <strong>.js</strong> --> false</li>
  <li><strong>files</strong>/test2/test <strong>.js</strong> --> false</li>
  </ul>
  
  <p>So far I have this regular expression: <code>(^(?!files\/)).*?((?!\.js)$)</code></p>
  
  <p>This works for "files/" but not for ".js".</p>
  
  <p><strong>Edit:</strong>
  Sorry for the misunderstanding. The string should only match if a string does NOT start with "files/" and does NOT end with ".js". </p>