Have a look at this and see if it helps. http://codepulsive.blogspot.com.au/2013/05/ant-process-elements-in-list.html
Peter “…we hear them telling in our own tongues the might works of God." > On 25 May 2015, at 9:58 pm, WebServices Development > <webservices_developm...@csx.com> wrote: > > I am trying to extract individual tokens in ANT after using stringtokenizer > to separate the tokens out. Is it possible? How do I do it without using any > other external ant libraries like ant-contrib? > > I attempted to do below, but am stuck at extracting individual tokens > > <property name="dirlist" value="./src:./.apt_generated:abc" /> > <loadresource property="dirseplist"> > <string value="${dirlist}" /> > <filterchain> > <tokenfilter> > <stringtokenizer delims=":" id="dirliststr"/> > <replaceregex pattern="(.+)" replace="[\1]" /> > </tokenfilter> > </filterchain> > </loadresource> > <echo level="info" message="dirlist: '${dirlist}'" /> > <echo level="info" message="dirseplist : '${dirseplist}'" /> > > And the output is > [echo] dirlist: './src:./.apt_generated:abc' > [echo] dirseplist : '[./src]:[./.apt_generated]:[abc]' > > Thanks --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org