You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Holger Rauch <ho...@heitec.de> on 2005/05/10 11:11:12 UTC
propertyregex: capitalizing entire string
Hi!
I'm trying to capitalize a string as demonstrated with the following small
sample build file:
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="test" basedir="." default="main">
<taskdef resource="net/sf/antcontrib/antcontrib.properties"/>
<target name="main">
<property name="foo" value="blah/blubber/foo"/>
<propertyregex property="FOO" input="${foo}" regexp="[a-z]"
replace="[A-Z]" global="true"/>
<echo>foo = ${foo}</echo>
<echo>FOO = ${FOO}</echo>
</target>
</project>
The output I get however is that each lowercase letter is converted
literally to "[A-Z]":
main:
[echo] foo = blah/blubber/foo
[echo] FOO =
[A-Z][A-Z][A-Z][A-Z]/[A-Z][A-Z][A-Z][A-Z][A-Z][A-Z][A-Z]/[A-Z][A-Z][A-Z]
Is case conversion possible with the propertyregex task from ant-contrib? If
so, which adjustments do I have to make?
Any help is greatly appreciated!
Greetings,
Holger
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org