----- Original Message ----- From: "Jo De Greef" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, April 05, 2004 4:52 PM Subject: [Nant-users] String::replace problem
> Hi all, > > I try to do a string::replace on one of my properties as following: > > <target name="test"> > <property name="testReplace" value="aabbcc" /> > <property name="testValue" value="zz" /> > <echo > message="${string::replace('${testReplace}','bb','${testValue}')}" /> > <echo message="${testReplace}" /> > </target> > > I would expect to get 'aazzcc' but instead this is the result: > > [echo] ${testReplace} > [echo] aabbcc > > It looks like Nant doesn't parse the parameters correctly: it treats > '${testReplace}' as '${testReplace}' instead of 'aabbcc'. > When I try to omit the quotes, I get an error that the build file is not > correct so that's not working either. try this : <echo message="${string::replace(testReplace,'bb',testValue)}" /> properties should not be enclossd in ${}. Hope this helps, Gert ------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ Nant-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/nant-users