ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William Ferguson" <william_fergu...@versata.com.au>
Subject RE: Substituting in CRLF in ReplaceRegExp
Date Wed, 02 Apr 2003 23:55:48 GMT
Many thanks Peter.

-----Original Message-----
From: peter reilly [mailto:peter.reilly@corvil.com]
Sent: Wednesday, April 02, 2003 4:49 PM
To: Ant Users List
Subject: Re: Substituting in CRLF in ReplaceRegExp


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


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



Mime
View raw message