title: Extract substring from ls
body: <p>I'm creating a little script and I have to list all my Tomcat binaries. <br/>
  So far I was able to do this:<br/>
  <code>ls -1 | grep '\-tomcat\-' | cut -f3 -d'-'</code><br/>
  <br/>
  This basically lists all the versions, but it adds the .zip or .tar.gz<br/></p>
  
  <pre><code>5.5.17.zip
  5.5.26.tar.gz
  5.5.27.tar.gz
  5.5.28.tar.gz
  5.5.31.tar.gz
  5.5.32.tar.gz
  </code></pre>
  
  <p><br/>
  I would like to know how to remove the .zip and .tar.gz from the extracted strings.<br/></p>