title: Delete all directories that contain digit(s) except for the most recently created in Red Hat Linux Server using Regex
body: <p>File Structure:</p>
  
  <pre><code>/56
  /57
  /58
  /lastFailedBuild
  /lastStableBuild
  ...
  </code></pre>
  
  <p>I'm trying to delete only <code>/56</code> and <code>/57</code>.</p>
  
  <p>Here is my current shell script that gets run during my Jenkins process.</p>
  
  <pre><code>rm -rf [0-9]*
  </code></pre>
  
  <p>but that obviously also deletes <code>/58</code>. I would like to do something like this: <code>rm -rf [0-9]*!({env.BUILD_NUMBER})</code> where I'm able to keep the rest of the directories including <code>/58</code>.</p>