ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Eberhart" <>
Subject RE: Parsing Properties
Date Fri, 04 Jun 2004 14:59:58 GMT
FYI, The following worked great! The <for> task uses the macrodev, therefore
is hundreds of times faster than the <foreach> task. The <propertyregx> task
can parse anything your little heart desires!

<target name="test4">
  <for param="current.file">
      <fileset dir="${web.content.dir}" />
      <echo message="processing file, @{current.file}" />
      <propertyregex property=""
        input=" @{current.file}
        regexp="Web Content\\([^*]*).*"
        casesensitive="false" />
      <echo message="partial file name, ${}" />

The above code outputs the following;
     [echo] processing file, C:\_project\eclipse\flex\Web
     [echo] partial file name, META-INF\MANIFEST.MF
     [echo] processing file, C:\_project\eclipse\flex\Web
     [echo] partial file name, WEB-INF\classes\JustToMakeTheFolderStay.class

Now I can use the partial file name to construct the paths I need.


-----Original Message-----
From: Gary Eberhart []
Sent: Thursday, June 03, 2004 1:53 PM
To: Ant User's List (E-mail)
Subject: Parsing Properties

Hello All,

I need to get a sub string of a path to use in building another path.

>From this string,

C:\_project\eclipse\flex\Web Content\flexgui\flexgui.jnlp

I need to create this string,


and this string,


Is there any easy way to do this?

Gary Eberhart
Manager New Product Development
Computer Marketing Corporation
Phone: 801-365-5000
Fax: 801-365-5100

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message