ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rebhan, Gilbert" <>
Subject RE: Replacing text in files
Date Fri, 25 May 2007 11:57:29 GMT
-----Original Message-----
From: Lars Monsees [] 
Sent: Friday, May 25, 2007 1:50 PM
Subject: Replacing text in files

How can I replace a line from this file with some other text? I thought about "loadfile" or
"patch", but donĀ“t know exactly if these would work.

use a filterchain with replaceregex or replacestring

<move file="path/to/srcfile" tofile="path/to/destfile">
	<replaceregex pattern="..." replace="..."/>
	<replacestring byline="true" from="\n" to="${line.separator}"/>

Regards, Gilbert

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message