ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniels, Doug" <Doug.Dani...@GDC4S.Com>
Subject RE: Retrieving a list of directory names from fileset without the fully qualified path
Date Fri, 02 Apr 2004 14:16:17 GMT
It would be very easy to replace a semicolon seperated paths with a newline
and do the regex work on it to convert it to a newline delimited set of
arguments.

Basically you take the DirSet, or FileSet you want to convert, in my example
I call it yourDirSet, then you do a <pathconvert> to convert those
pathelements to a property, and during that convert you replace the pathsep
";" with the xml entity for newline "&#10;". Then you run the
<propertyregex..> passing in the newly converted path property at
${propDirSet}.

Here is the snippet:

<pathconvert pathsep="&#10;" refid="yourDirSet" property="propDirSet"/>

<propertyregex property="arg" global="true" override="true"
       input="${propDirSet}"
       regexp="[a-zA-Z]:\\([^\\\s]+\\)+"
       replace=""
       defaultValue="failed" />


Hope that works for you.

~ Doug Daniels

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message