Java Mailing List Archive

http://www.ant-tasks.com/

Apache Ant Archive

» Ant Users List
» Ant Developers List
Replace without a token

Replace without a token

2003-02-07       - By Martin Funk

Hello!

Im looking for a "replacement" task that replaces a certain substring in
a file with a given value, regardless of what is in the certain substring.

example:
   private static final int level = 3;
should be replaced by:
   private static final int level = 4;

the information i could give are the begin delimiter and the end
delimiter, something like
<myreplacement file="....." begindelimiter="private static final int
level = " enddelimiter=";" value="4">

Is there a task out there that does that for me, or maybe there is a
reason why there isn't one.

Thanks a lot & "Frohes Schaffen"

Martin



©2008 ant-tasks.com - Jax Systems, LLC, U.S.A.