Try <propertyregex> from AntContrib. It will allow you to create a new
property value using a regular expression.

HTH Bill 

-----Original Message-----
From: Matthew Hughes [mailto:[EMAIL PROTECTED] 
Sent: Friday, February 03, 2006 9:33 AM
To: user@ant.apache.org
Subject: Filtering on property values

I have a property

<property name="version" value="7.6.1" />

In certain tasks, I want the version value to be "7_6_1" with underscores
replacing the periods.  How do I create a new property that would have this
value.  I know how to use filters to filter tokens when copying files, but I
can't seem to figure out how to do that for the value of a property.

e.g. I want to do something like this:

<filterset id="replace.version">
        <filter token="." value="_" />
</filterset>

<property name="friendly.version" value="${version}
filterid="replace.version" />

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED] For additional
commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to