ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: backslash and CRLF in regular expression
Date Wed, 23 Jun 2004 06:10:46 GMT
On Tue, 22 Jun 2004, luis conelly <luis.conelly@ge.com> wrote:
> Hi all,
> 
> 	It turns out that I have these files that have several lines
> 	like following:
> 
> blablabla blabla bla \
> blablabla blabla bla \
> blablabla blabla bla;
> 
> and I want to make a single line like:
> 
> blablabla blabla bla blablabla blabla bla blablabla blabla bla;
> 
> I have tried this:
> 
>     <target name="replace">
>         <replaceregexp byline="true" file="myfile">
> 	    <regexp pattern="\\&#13;&#10;"/>
>           <substitution expression=""/>
>          </replaceregexp>
>     </target>

byline="true" is probably destroying all your attempts since this will
match patterns against each line and strip the CR and LF characters.
Try byline="false".  Oh, and I'd probably use ${line.separator}
instead of &#13;&#10; for easier portability.

Stefan

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


Mime
View raw message