ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <steve_lough...@hpl.hp.com>
Subject Re: replace &lt; with < in property ??
Date Thu, 02 Feb 2006 16:42:11 GMT
Rebhan, Gilbert wrote:
> Hi,
> 
> Problem =
> 
> i have a property like that :
> 
> &lt;bla&gt;foobar&lt;/bla&gt;
> 
> and i want it to convert to =
> 
> <bla>foobar</bla> before putting in
> in a mailbody
> 
> i've tried =
> 
> <propertyregex property="foobar"
>                   input="${auftrag.bemerkung}"
>                   regexp="lt;"
>                   replace="<"
>                   casesensitive="false" />
> 
> but that is not accepted.

no, obviously not.

Remember that in XML &lt; is turned into < before ant sees it, so you 
need to escape the search and replace
strings:


  <propertyregex property="foobar"
                    input="${auftrag.bemerkung}"
                    regexp="&amp;lt;"
                    replace="&lt;"
                    casesensitive="false" />



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


Mime
View raw message