ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From himanshu <mertia.himan...@gmail.com>
Subject problem using "<replaceregexp>" when using with DIRECTORY location
Date Tue, 25 Oct 2011 08:15:12 GMT
hi, 
<br>
i am having trouble in doing this..
there is 1 batch file(MY_FILE) with this line in it..
<br>
*set TEST_DIR=C:\temp\dir1*
<br>
i just want to set some new value to *TEST_DIR*
<br>
but when i use <replaceregexp> in my ant script..it escapes forward
slashes.. and gives this result
<br>
*set TEST_DIR=C:homedir2*
<br>
but correct value should be as below
<br>
*set TEST_DIR=C:\home\dir2*
<br>
.. i am using this command in my ant build file..


"
<property name="MY_FILE" location="${MT_BATCH_FILE_LOCATION}\myfile.bat" />
<replaceregexp file="${MY_FILE}" match="TEST_DIR=C:\\temp\\dir1"
replace="TEST_DIR=C:\home\dir2" byline="true" /> 
"

..

..PLZ help

--
View this message in context: http://ant.1045680.n5.nabble.com/problem-using-replaceregexp-when-using-with-DIRECTORY-location-tp4935408p4935408.html
Sent from the Ant - Users mailing list archive at Nabble.com.

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


Mime
View raw message