Anyway, as of Ant 1.7, check out what is possible. Run the following build file:
<project name="test" default="test">
<target name="test">
<loadresource property="abc">
<string value="One two three four" />
</loadresource>
<echo message="abc=${abc}" />
<loadproperties>
<string value="one=two${line.separator}three=four"/>
</loadproperties>
<echo message="one=${one}" />
<echo message="three=${three}" />
<loadresource property="test">
<string value="${one} two ${three} four" />
</loadresource>
<echo message="test=${test}" />
<loadresource property="test2">
<string value="${test}" />
<filterchain>
<replaceregex pattern="f(ou)r"
replace="f\1l"
flags="g"/>
</filterchain>
</loadresource>
<echo message="test2=${test2}" />
</target>
</project>
And you will see this output:
C:\testing\>ant -f testbuild.xml
Buildfile: testbuild.xml
test:
[echo] abc=One two three four
[echo] one=two
[echo] three=four
[echo] test=two two four four
[echo] test2=two two foul foul
BUILD SUCCESSFUL
Total time: 0 seconds
I wish I had this in my back pocket about four years ago...