Try this:

<replaceregexp file="${MY_FILE}" match="TEST_DIR=C:\\temp\\dir1" replace="TEST_DIR=C:\\\\home\\\\dir2" byline="true" />D



On Tue, 25 Oct 2011, himanshu wrote:

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-unsubscr...@ant.apache.org
For additional commands, e-mail: user-h...@ant.apache.org



Scot P. Floess             RHCT  (Certificate Number 605010084735240)
Chief Architect FlossWare  http://sourceforge.net/projects/flossware
                           http://flossware.sourceforge.net
                           https://github.com/organizations/FlossWare

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

Reply via email to