ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anthony Rodriguez <Anth...@WeddingChannel.com>
Subject wild cards in replace task
Date Thu, 30 Aug 2001 22:00:25 GMT
Does anyone know if you can use wildcards in the token attribute of the
replace task?  Say I have a file called text.txt that looks like this:

text.txt:
line1="blah blah blah"; 
line2="something else";

Now I want to use a replace task in my build.xml that looks like:
....
<target name="replace"">
<replace file="text.txt" value="line1=${some.new.property};">
<replacefilter token="line1=" * ";/>
</replace>
</target>
.....

I want to use the * because I want to replace the whole line with a new
line.  I won't always know the exact text in text.txt, so it would be more
useful just to replace a whole line.  Is there a way to do this (I tried the
* and it didn't work)?  I tried to look for docs on replacefilter but I
couldn't find any.

-Anthony

Mime
View raw message