ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rolf F. Katzenberger <rf...@gmx.net>
Subject Re: AW: Antwort: AW: howto: generating buildfile from template
Date Mon, 22 Jul 2002 15:23:15 GMT
On Mon, 22 Jul 2002 16:24:14 +0200, "Koegel, Michael"
<Michael.Koegel@partner.commerzbank.com> wrote:

> You may either use a small <script> or LoadProperties with a custom
> FilterReader. ReplaceRegExp unfortunately only works on Files not
> Properties. MK

You can also use brute force ;), if you are able to maintain a
character map for non-ASCII letters: 

	<property name="string" value="THIS IS MESSAGE" />
	
	<echo message="${string}" file="temp.txt" />
	<replace file="temp.txt">
		<replacefilter token="A" value="a"/>
		<replacefilter token="B" value="b"/>
		<replacefilter token="C" value="c"/>
		<replacefilter token="D" value="d"/>
		<replacefilter token="E" value="e"/>
		<replacefilter token="F" value="f"/>
		<replacefilter token="G" value="g"/>
		<replacefilter token="H" value="h"/>
		<replacefilter token="I" value="i"/>
		<replacefilter token="J" value="j"/>
		<replacefilter token="K" value="k"/>
		<replacefilter token="L" value="l"/>
		<replacefilter token="M" value="m"/>
		<replacefilter token="N" value="n"/>
		<replacefilter token="O" value="o"/>
		<replacefilter token="P" value="p"/>
		<replacefilter token="Q" value="q"/>
		<replacefilter token="R" value="r"/>
		<replacefilter token="S" value="s"/>
		<replacefilter token="T" value="t"/>
		<replacefilter token="U" value="u"/>
		<replacefilter token="V" value="v"/>
		<replacefilter token="W" value="w"/>
		<replacefilter token="X" value="x"/>
		<replacefilter token="Y" value="y"/>
		<replacefilter token="Z" value="z"/>
	</replace>
	<loadfile property="as.lowercase" srcFile="temp.txt" />

	<echo message="${as.lowercase}" />

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


Mime
View raw message