Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 33903 invoked from network); 19 Feb 2004 11:31:14 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 19 Feb 2004 11:31:14 -0000 Received: (qmail 24454 invoked by uid 500); 19 Feb 2004 11:31:05 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 24419 invoked by uid 500); 19 Feb 2004 11:31:05 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 24403 invoked from network); 19 Feb 2004 11:31:04 -0000 Received: from unknown (HELO relay1.hrnoc.net) (216.120.226.254) by daedalus.apache.org with SMTP; 19 Feb 2004 11:31:04 -0000 Received: from smtp-1.hrnoc.net ([216.120.225.37]) by relay1.hrnoc.net with esmtp (Exim 4.30; FreeBSD) id 1AtmOY-000PBg-6V for user@ant.apache.org; Thu, 19 Feb 2004 06:31:06 -0500 Received: (qmail 21111 invoked by uid 509); 19 Feb 2004 11:30:32 -0000 Received: from josep.rio@uworks.net by smtp-1.hrnoc.net by uid 89 with qmail-scanner-1.20st (clamuko: 0.65. spamassassin: 2.63. Clear:RC:1(62.57.159.66):. Processed in 0.159902 secs); 19 Feb 2004 11:30:32 -0000 X-Qmail-Scanner-Mail-From: josep.rio@uworks.net via smtp-1.hrnoc.net X-Qmail-Scanner: 1.20st (Clear:RC:1(62.57.159.66):. Processed in 0.159902 secs) Received: from docsis159-66.menta.net (HELO ryoohki) (josep.rio@uworks.net@62.57.159.66) by smtp-1.hrnoc.net with SMTP; 19 Feb 2004 11:30:32 -0000 From: =?iso-8859-1?Q?Josep_del_R=EDo?= To: "'Ant Users List'" Subject: RE: Remove blank lines Date: Thu, 19 Feb 2004 12:30:31 +0100 Organization: uWorks Message-ID: <000901c3f6db$c938a7f0$429f393e@ryoohki> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 In-Reply-To: <6.0.0.22.2.20040219115536.01ef56d8@in.telenet.be> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Importance: Normal X-HR-Scan-Signature: a2b9fe11756492a389dd61c990d2232f X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N It works for me... what OS are you using? I'm using Windows. Try to substitute "\r\n" for "\n", and " " for " ". -----Original Message----- From: J=FCrgen Hauser [mailto:hauser@pandora.be]=20 Sent: jueves, 19 de febrero de 2004 11:57 To: Ant Users List Subject: RE: Remove blank lines Thanks for replying. But it doesn't seem to work as expected. Either way, i=20 will solve it otherwise, i will execute a script which will take care of it=20 (all it takes is one line of code). Thanks again! At 00:28 19.02.2004, you wrote: >I think that the following should do the trick: > > > > > > > > > >Where "\r\n[\s]*\r\n[\s]*\r\n" means 2 blank lines and >" " means 1 blank line, so the maximum of blank lines >will be 1. > > > >-----Original Message----- >From: J=FCrgen Hauser [mailto:hauser@pandora.be] >Sent: mi=E9rcoles, 18 de febrero de 2004 20:35 >To: user@ant.apache.org >Subject: Remove blank lines > >Hi, > >I'm having troubles finding out how to actually remove blank lines. > >I have a regular expression which will match all blank lines, but since >it >needs to be replaced with something, you get the problem ;) > > > > > > > > > >To be honest, what i would really like to achieve is to have it remove >blank lines only if there are two or more blanklines in a row, so it >still >leaves one blank line. > >ie. > >1. $foo =3D 'bar'; >2. blank line >3. blank line >4. $user =3D& new User(); >5. blank line >6. $user->doSomething(); > >would result in > >1. $foo =3D 'bar'; >2. blank line >3. $user =3D& new User(); >4. blank line >5. $user->doSomething(); > >Thanks a lot in advance! > >Regards, >J=FCrgen > > > >--------------------------------------------------------------------- >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 --------------------------------------------------------------------- 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