ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peter reilly <peter.rei...@corvil.com>
Subject Re: Substituting in CRLF in ReplaceRegExp
Date Wed, 02 Apr 2003 06:49:10 GMT
The \n does not get interpreted by xml. You
need to use  a property like this:
      <substitution expression="foo ${line.separator} bar"/>
Peter.

On Wednesday 02 April 2003 08:24, William Ferguson wrote:
> I'm having trouble insrting CRLF via ReplaceRegExp.
> It just seems to entirely ignore the "\n" in the substituion expression.
> I've tried prefixing with multiple back slashes but to no avail.
> Using Ant 1.5, JDK 1.4.1 and the ORO mapper.
>
> <replaceregexp flags="s">
>    <regexp pattern="somepatternThatMatches"/>
>    <substitution expression="foo \n bar"/>
>    <fileset dir="${test.dir}">
>       <include name="**/*.java"/>
>    </fileset>
> </replaceregexp>
>
> Any ideas?
>
>
> William Ferguson
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message