I have a property whose value contains a $
. I'd like to use this property as a regexp in a propertyregexp
. Ant appears to resolve the property as a paramater to the propertyregexp
, but then the dollar gets interpreted as a regexp symbol.
Example:
<property name="a" value="abc$" />
<property name="b" value="xyz" />
<path id="paths">
<pathelement location="abc$/def" />
<pathelement location="abc$/ghi" />
</path>
<pathconvert property="list" refid="paths" pathsep="${line.separator}" dirsep="/" />
<propertyregex property="list" input="${list}" override="true" regexp="${a}(.*)" replace="${b}\1" />
<echo message="${list}" />
I'd like to get the pair xyz/def
and xyz/ghi
. Is this possible? I'm using Ant 1.8.