Thanks for the tip! -----Original Message----- From: Garrett Smith [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 09, 2008 8:22 AM To: Ant Users List Subject: Re: substring
On Tue, Jul 8, 2008 at 12:51 PM, Anthony Muller <[EMAIL PROTECTED]> wrote: > Hello, > > Is it possible to do a substring operation with Ant? > Not exactly. But it is possible to do a string/token replacement -- not exactly what you asked, but it can get the job done. This is done using a FilterChain, http://ant.apache.org/manual/CoreTypes/filterchain.html I'm using this feature to replace certain strings in my files with the empty string (removal). In the example below, I replace "from" with "to" from: "APE.namespace("APE.dom");" to: "" http://dhtmlkitchen.com/ape/build.xml <concat destfile="${src}/dom/_dom.js"> <filelist dir="${src}/dom" files="viewport-f.js, position-f.js, classname-f.js, traversal-f.js, Event.js"/> <filterchain> <tokenfilter> <replacestring from="APE.namespace("APE.dom");" to=""/> <replacestring from="APE.namespace('APE.dom');" to=""/> </tokenfilter> </filterchain> </concat> Garrett > Cheers, > Anthony --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]