ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From WebServices Development <>
Subject Extracting individual tokens after using stringtokenizer
Date Mon, 25 May 2015 11:58:11 GMT
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}" />
            <stringtokenizer  delims=":" id="dirliststr"/>
            <replaceregex pattern="(.+)" replace="[\1]" />
<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]'


This email transmission and any accompanying attachments may contain CSX privileged and confidential
information intended only for the use of the intended addressee. Any dissemination, distribution,
copying or action taken in reliance on the contents of this email by anyone other than the
intended recipient is strictly prohibited. If you have received this email in error please
immediately delete it and notify sender at the above CSX email address. Sender and CSX accept
no liability for any damage caused directly or indirectly by receipt of this email.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message