-----Original Message----- From: Lars Monsees [mailto:[EMAIL PROTECTED] Sent: Friday, May 25, 2007 1:50 PM To: user@ant.apache.org 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"> <filterchain> <tokenfilter> <replaceregex pattern="..." replace="..."/> <replacestring byline="true" from="\n" to="${line.separator}"/> </tokenfilter> </filterchain> </move> Regards, Gilbert --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]