I am writing Ant scripts.
I have a property which has the value: "C\:Program Files\\test1\\test2"
Is there a method in Ant to convert it to: C:Program Files\test1\test2
I am writing Ant scripts.
I have a property which has the value: "C\:Program Files\\test1\\test2"
Is there a method in Ant to convert it to: C:Program Files\test1\test2
You could use : http://ant-contrib.sourceforge.net/tasks/tasks/propertyregex.html
although I am not sure if this will do what you are asking for. Are the backslashes visible when you echo your property?
In any case to use the above task you will have to have ant-contrib installed and simply write a task like this :
Output :
In addition you could use any of the BSF languages :
http://ant.apache.org/manual/Tasks/script.html
provided you are using jre 1.6 and above.