----- Original Message -----
From: "Anthony Rodriguez" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, March 19, 2002 4:56 PM
Subject: matching a string in a property


> Hi, I have a question regarding finding a string in a property.  Say I
have
> a property like this:
>
> <property name="foo" value="a_very_short_string">
>
> Now I want to search that property for a string, let's say "short".  If
the
> property has "short" in it then I want to do task A.  If not, then do not
do
> task A.  Something like this:
>
> <condition property="doTaskA" value="true">
>    <exists key="short" inproperty="foo"/>    #made this up for
illustration
> purposes
> </condition>
>


that'll be the
<condition ...>
    <contains string="${foo}" substring="short"/>
</condition>

in the CVS tree only, not ant 1.4.1


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to