propertyregex removes return characters in multiline
Posted
by javydreamercsw
on Stack Overflow
See other posts from Stack Overflow
or by javydreamercsw
Published on 2010-04-15T22:05:14Z
Indexed on
2010/04/15
22:13 UTC
Read the original article
Hit count: 515
I'm using ants propertyregex method to change a property and it works fine up to a point. I'm lossing return characters.
Here's what I'm trying to change:
cluster.path=\
${nbplatform.active.dir}/harness:\
${nbplatform.active.dir}/platform:\
${nbplatform.active.dir}/nb
This is in a .properties file.
So I'm trying to change it like this:
<propertyregex property="cluster.path"
input="${cluster.path}"
regexp="nbplatform.active.dir"
replace="xplatform.base"
global="true"
override="true"/>
The stuff is replaced but I get:
cluster.path= ${xplatform.base}/harness\: ${xplatform.base}/platform\: ${xplatform.base}/nb
This brakes logic down the line not controlled by me (Netbeans) that uses the ':' as delimiter.
Any idea?
© Stack Overflow or respective owner