title: Copying files matching a regex in ant
body: <p>I'm having trouble copying some files which match a pattern in my ant script.</p>
  
  <p>I have the following:</p>
  
  <pre><code>&lt;property name="IncludedLocales" value="de_DE|es_ES|fr_FR|it_IT|ja_JP" /&gt;
  
  &lt;copy todir="${dest}"&gt;
              &lt;fileset dir="${src}" includes="**/*.properties" /&gt;
              &lt;mapper type="regexp" from="(messages(_${IncludedLocales})?\.properties)" to="\1" /&gt;
  &lt;/copy&gt;
  </code></pre>
  
  <p>${src} contains the files messages.properties, as well as messages_de_DE.properties, messages_es_ES.properties, etc.</p>
  
  <p>But for some reason, only messages.properties, and messages_de_DE.properties get copied (and if I changed IncludedLocales to 'es_ES|de_DE|fr_FR|it_IT|ja_JP', messages_es_ES.properties gets copied instead of messages_de_DE.properties).</p>
  
  <p>Am I missing something really simple?</p>