title: ant: string manipulation on variable
body: <p>I have a question based from this question
  <a href="https://stackoverflow.com/questions/1176071/replacing-characters-in-ant-property">Replacing characters in Ant property</a></p>
  
  <p>I want to build a variable (i can't use a property because i'm in a loop) that is pretty much StringA - StringB.
  (maybe this is a misunderstanding of properties on my part but they can only be assigned once correct?)</p>
  
  <p>I guess I could build a script function to calculate that, but my guess is that it must be possible to do it in an already existing function, probably something i'm missing.</p>
  
  <p>this would be an example of the code</p>
  
  <pre><code>    &lt;for param="file"&gt;
        &lt;path&gt;
          &lt;fileset dir="${mydir}" &gt;
            &lt;include name="*.war"/&gt;
          &lt;/fileset&gt;
        &lt;/path&gt;
        &lt;sequential&gt;
          &lt;var name="undeploy_name" value="@{file} function_here ${mydir}" /&gt;
          &lt;JBossCLI port="${jboss.port.management-native}"&gt;
            &lt;undeploy namePattern="${undeploy_name}" /&gt;
          &lt;/JBossCLI&gt;
          &lt;deployToLiferay file="@{file}" /&gt;
        &lt;/sequential&gt;
      &lt;/for&gt;
  </code></pre>
  
  <p>in general I want to deploy several wars. this works fine when I run it once but if I want to make it re-runnable I need to undeploy them first.</p>
  
  <p>I'm just a consumer of this interfaces, Ideally deployToLiferay would auto undeploy but it does not.</p>
  
  <p>thanks for an feedback</p>
  
  <p>edit: if I use something similar to what is define on the linked page i get:</p>
  
  <pre><code>&lt;loadresource property="file-to-deploy"&gt;
    &lt;propertyresource name="@{file}"/&gt;
    &lt;filterchain&gt;
      &lt;tokenfilter&gt;
        &lt;filetokenizer/&gt;
        &lt;replacestring from="${mydir}" to=""/&gt;
      &lt;/tokenfilter&gt;
    &lt;/filterchain&gt;
  &lt;/loadresource&gt;
  
  10:52:49.541:  * /data/contribution.xml:171: The following error occurred while executing this line:
  10:52:49.541:  * /data/contribution.xml:178: null doesn't exist
  </code></pre>
  
  <p>line 178 is my loadresource part</p>