ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Goktepe" <andrewgokt...@gmail.com>
Subject Re: String replace.
Date Thu, 23 Aug 2007 01:34:52 GMT
Try escaping the & character xml-style with &amp; instead of \&

pattern="&amp;lt;"

-Andrew

On 8/22/07, Chun Ji <CJi@pro-unlimited.com> wrote:
>
>
> Hi,
>
> Does someone know how to replace a string such as "&lt;" to be "<" in a
> html file by ANT.
> The target that I have created in my build.xml is :
> "
> ...
> <target name="change">
>         <replaceregex file="test.html" pattern="\&lt;" replace="<" />
>         <replaceregex file="test.html" pattern="\&gt;" replace=">" />
> </target>
> ..
> ",
>
> but I see such errors:
> "
> The value of attribute "replace" associated with an element type
> "replaceregex" must not contain the '<' character.
> "
>
>
> Thanks a lot,
>
>
> Charlie
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message