You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Document <dd...@gmail.com> on 2009/03/31 00:46:18 UTC
How to get substring of a property
Hi,
How do I get a substring of a property? Lets say I have a property whose
value is "some.value". I want only the characters before the dot i.e.
"some". Any pointers? Please reply to me along with the
user@ant.apache.orgemail id
Thanks
P
AW: How to get substring of a property
Posted by "Knuplesch, Juergen" <Ju...@icongmbh.de>.
I use propertyregex from antcontrib:
<propertyregex property="vm.propertyname" input="${vm.propertytupel}"
regexp="([^#]*)#([^#]*)"
select="\1"
defaultvalue="Error"
override="true"/>
<echo>Property vm.propertyname=${vm.propertyname}</echo>
--
Jürgen Knuplesch
-----Ursprüngliche Nachricht-----
Von: Document [mailto:ddocument@gmail.com]
Gesendet: Dienstag, 31. März 2009 00:46
An: user@ant.apache.org
Betreff: How to get substring of a property
Hi,
How do I get a substring of a property? Lets say I have a property whose value is "some.value". I want only the characters before the dot i.e.
"some". Any pointers? Please reply to me along with the user@ant.apache.orgemail id
Thanks
P
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org