ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilbert Rebhan <...@schillbaer.de>
Subject replaceregexp problem
Date Tue, 18 Oct 2005 17:41:02 GMT
Hi,

i want to change one line in a txtfile.

1. if txtfile is like =

foo=bar
bla=bla

<property name="insert" value="123456"></property>
    	
<replaceregexp file="J:\test\bla.txt"
 match="bla.*"
 replace="\0:${insert}">
</replaceregexp>

works as it should, gives me =

foo=bar
bla=bla:123456

2. but if txtfile is like =

foo=bar
bla=bla
foobar=foobar

means the line to be altered is not the last line

my snippet above gives me =

foo=bar
bla=bla
:123456
foobar=foobar

What went wrong, how to get it right ?
Any ideas ?

Regards, Gilbert

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message