Excellent point.

Delimiting the items in the list may be necessary.  Unfortunately, there is not 
a containsregexp condition to help with separating the values from the 
delimiters and boundaries.

Scriptcondition might be a better alternative if you have the bsf.jar and a 
supported language


>> -----Original Message-----
>> From: Francis GALIEGUE [mailto:f...@one2team.com]
>> Sent: Wednesday, August 12, 2009 1:12 PM
>> To: Ant Users List
>> Subject: Re: If any one from list then
>> 
>> On Wed, Aug 12, 2009 at 10:05, Alec Fernandez<alec.fernan...@sas.com>
>> wrote:
>> > After spending 2 days convincing myself that there was a problem
>> with the <different> selector only to discover that my diff tool was
>> lying and that one of the files was indeed different (unix line ends
>> versus pc line ends so my editor was deceiving me too), I'm feeling
>> the need to respond :-)
>> >
>> > I think the condition task is what you are after.
>> >
>> > <condition>
>> >  <or>
>> >    <contains string="${myprop}" substring="foo" />
>> >    <contains string="${myprop}" substring="foo2" />
>> >  </or>
>> > </condition>
>> >
>> 
>> The problem is that if you want "foo" and the list is "foobar, baz",
>> the condition will match.
>> 
>> This is not an easy problem, admittedly. It could be done with two
>> imbricated <foreach> statements, but that would be an O(n^2)
>> algorithm. It may, or may not, be a problem, depending on the problem
>> size.
>> 
>> --
>> 
>> Francis Galiegue
>> ONE2TEAM
>> Ingénieur système
>> Mob : +33 (0) 683 877 875
>> Tel : +33 (0) 178 945 552
>> f...@one2team.com
>> 40 avenue Raymond Poincaré
>> 75116 Paris
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
>> For additional commands, e-mail: user-h...@ant.apache.org
>> 

Reply via email to