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
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.