ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <>
Subject Re: Task for substringing?
Date Tue, 12 Jun 2007 15:43:13 GMT

--- Kevin Jackson <> wrote:

> Hi all,
> In the project I'm working on I have a need to be
> able to substring an
> expanded property value
> <property name="test" value="123">
> <substring src="test" begin="1" end="2"
> property="new">
> <echo>${new}</echo>
> -> 23
> Is there a way of achieving this already?  Looking
> through the manual
> I don't see a way of doing this without using
> scriptdef + script
> language du jour and for my current project I cannot
> use that.
> If there currently isn't a way of achieving this,
> then I can put
> something together for it (and get paid for it :)

Hi Kev-
  It seems like some combination of string resources,
tokens resource collections, and regex filters might
give you substringing capabilities.  Beyond that,
another idea that occurs to me is that, if you're
being paid to develop this... ;), PropertyHelpers have
been for quite some time in need of refinement as to
how a user can easily register a custom
PropertyHelper.  If we could ever get this off our
plate we could close e.g. the myriad requests for
nested property resolution.  How does this relate?  In
that it strikes me as a natural idea that there be a
custom PropertyHelper that implements the
substringing, defaulting, etc. extensions found in the
bash shell (probably came from some other shell but I
don't feel like researching the origin just to make my


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

Get the free Yahoo! toolbar and rest assured with the added security of spyware protection.

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

View raw message