ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Weiqi Gao <weiqi...@networkusa.net>
Subject How to Split a String in Ant?
Date Thu, 30 Oct 2003 15:56:17 GMT
Hi,

I'm looking for a way to split a string that's passed in as a property, 
but I couldn't find the task that will allow me to do this.

My build file will be fed properties like "something_something_15", and 
I want a property generated that contains the string "15".  If the last 
part after the underscore is not a number, I want the property generated 
to have a value "9999".

Any pointers are welcome.

TIA
--
Weiqi Gao
weiqigao@networkusa.net
http://www.weiqigao.com


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


Mime
View raw message