ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: Replace.java and "\n"
Date Tue, 08 Jan 2002 07:12:47 GMT
On Mon, 7 Jan 2002, Paul Pantages <ppantage@xtera.com> wrote:

> I was having trouble replacing a token with a value containing
> newline "\n". The replace task was just printing out the two
> characters '\' & 'n' instead of newline.
> 
> E.g., 
>    <replace
>      file="filename"
>      token="#BlaBla"
>      value="\n#BlaBla"
>    />

\n is \n not a new line in anything but C-like programming languages.
Try the XML escape for a new line &#x0A; or the system property
line.separator which can be accessed via ${line.separator}.

Stefan

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


Mime
View raw message