Return-Path: Delivered-To: apmail-jakarta-ant-dev-archive@apache.org Received: (qmail 94489 invoked from network); 26 Jun 2002 16:43:58 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by 209.66.108.5 with SMTP; 26 Jun 2002 16:43:58 -0000 Received: (qmail 486 invoked by uid 97); 26 Jun 2002 16:43:57 -0000 Delivered-To: qmlist-jakarta-archive-ant-dev@jakarta.apache.org Received: (qmail 346 invoked by uid 97); 26 Jun 2002 16:43:56 -0000 Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 156 invoked by uid 98); 26 Jun 2002 16:43:55 -0000 X-Antivirus: nagoya (v4198 created Apr 24 2002) Message-ID: <20020626164340.30382.qmail@web13401.mail.yahoo.com> Date: Wed, 26 Jun 2002 09:43:40 -0700 (PDT) From: Diane Holt Subject: Proposed fix for ReplaceRegExp.java To: ant-dev@jakarta.apache.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Rating: 209.66.108.5 1.6.2 0/1000/N X-Spam-Rating: 209.66.108.5 1.6.2 0/1000/N Currently, there doesn't seem to be any way to actually delete a line using -- the best you can do is end up with a blank line. To get it to delete the line if the result is empty involves just a small change: 289,291c289 < if (res.trim().length() != 0) { // non-blank line < pw.println(res); < } --- > pw.println(res); 313,315c311 < if (res.trim().length() != 0) { // non-blank line < pw.println(res); < } --- > pw.println(res); Do people agree this should be the default behaviour? I think it should be, but maybe you'd prefer also adding an attribute that says whether to do it this way or leave the replacement as a blank line? (If you would, suggestions for what to call it, please.) Thanks, Diane ===== (holtdl@yahoo.com) __________________________________________________ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com -- To unsubscribe, e-mail: For additional commands, e-mail: