ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nehal Patel <nehalhpatel...@gmail.com>
Subject Update property value in file and retaining format.
Date Fri, 13 Jan 2012 23:01:14 GMT
Hello,
Having an problem updating the value of in a property file and
retaining the format.  For example i have the following
stuff.properties:
test1  <tab> <tab> <tab> =aaa
test2  <tab> <tab> <tab> =bbb
test3  <tab> <tab> <tab> =ccc


I run the following:
	<target name="update-stuff-properties">
		<replaceregexp file="stuff.properties"
			match="^[ \t]*test2[ \t]*=.*$"
			replace="test2=zzzzzzzz"
			byline="true"
		/>
	</target>


I get the following:
test1  <tab> <tab> <tab> =aaa
test2=zzzzzzzz
test3  <tab> <tab> <tab> =ccc


I must be missing something on how to retain the "  <tab> <tab> <tab>
" which proceed the "=".

Thanks.

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


Mime
View raw message