title: Which ANT-style path pattern can catch foo_1.23.456_bar.baz but not foo_1.23.456_qux_bar.baz in a JenkinsFile?
body: <p>The context is a JenkinsFile in which I need to use the <code>copyArtifacts</code> function to catch a specific file among all the artifacts of another build. This function uses <code>ANT-style path pattern</code>. The build contains several artifacts:</p>
  
  <ul>
  <li><strong>foo_1.23.456_bar.baz</strong></li>
  <li>foo_1.23.456_qux_bar.baz</li>
  <li>foo_1.23.456_thud.baz</li>
  </ul>
  
  <p>And I only want to catch the first one, <em>without catching another one</em>. The <code>1.23.456</code> part is varying and can contain any set of decimal number (it's a version number). </p>
  
  <p><strong>What I tried so far</strong></p>
  
  <ul>
  <li><code>foo_*([0-9]).*([0-9]).*([0-9])_bar.baz</code></li>
  <li><code>foo_*\.*\.*\._bar.baz</code></li>
  <li><code>foo_*\\.*\\.*\\._bar.baz</code></li>
  </ul>
  
  <p>In all those cases, I either get a Jenkins syntax error, or I don't catch any file at all, or I catch too many of them. I've thoroughly read <a href="https://stackoverflow.com/questions/2952196/learning-ant-path-style">this QA</a> but this time it didn't help me.  </p>
  
  <p>Can someone help me figuring out the correct ANT-style path pattern for this specific usecase ? </p>