title: How to use ls to list out files that end in numbers
body: <p>I'm not sure if I'm using regular expressions in bash correctly.  I'm on a Centos system using bash shell.  In our log directory, there are log files with digits appended to them, i.e. </p>
  
  <pre><code>stream.log
  stream.log.1
  stream.log.2 
  ...
  stream.log.nnn  
  </code></pre>
  
  <p>Unfortunately there are also log files with the new naming convention, </p>
  
  <pre><code>stream.log.2014-02-14 
  stream.log.2014-02-13
  </code></pre>
  
  <p>I need to get files with the old log file naming format.  I found something that works but I'm wondering if there's another more elegant way to do this.</p>
  
  <pre><code>ls -v stream.log* | grep -v 2014
  </code></pre>
  
  <p>I don't know how regular expressions work in bash and/or what command (other than possibly grep) to pipe output to.  The cmd/regex I was thinking of is something like this:</p>
  
  <pre><code>ls -v stream.log(\.\d{0,2})+
  </code></pre>
  
  <p>Not surprisingly, this didn't work.  Maybe my logic is incorrect but I wanted to say from the cmdline list files with the name stream.log with an optional .xyz at the end where xyz={1..999} is appended at the end.  Please let me know if this is doable or if the solution I came up with is the only way to do something like this.  Thanks in advance for your help.</p>
  
  <h3>EDIT: Thanks for everyone's prompt comments and reply.  I just wanted to bring up that there's also a file called <code>stream.log</code> that doesn't any digits appended to it that also needs to make it into my <code>ls</code> listing.  I tried the tips in the comment and answer and they work but it leaves out that file.</h3>