Ant Task "Replace" is for find-and-replace in contents of a file. Can this used (or is there other task) to work directly on a property value.
e.g. I want to find ampersand from a property value and replace it with some other string. Now I achieve it in multiple steps.
<property name="prop_before" value="ABC&PQR" />
<echo file="propFile" message="${prop_before}" />
<replace file="propFile" token="&" value="ESACAPE_AND" />
<loadfile property="prop_after" srcFile="propFile"/>
Is there any ant task like below ?
<replace source_property="prop_before"
destination_property="prop_after"
token="&"
value="ESACAPE_AND"
/>