Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 73104 invoked from network); 11 Jul 2006 18:06:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 11 Jul 2006 18:06:49 -0000 Received: (qmail 72150 invoked by uid 500); 11 Jul 2006 18:06:43 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 72116 invoked by uid 500); 11 Jul 2006 18:06:43 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 72105 invoked by uid 99); 11 Jul 2006 18:06:43 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Jul 2006 11:06:43 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of ddevienne@gmail.com designates 64.233.182.185 as permitted sender) Received: from [64.233.182.185] (HELO nf-out-0910.google.com) (64.233.182.185) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 11 Jul 2006 11:06:42 -0700 Received: by nf-out-0910.google.com with SMTP id p77so410613nfc for ; Tue, 11 Jul 2006 11:06:21 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=SjS9KMNkEsyta7XbrzwuGsYmJ9bSyhs1r/5o5F7wKGvB2T+22qINEG2PiPoYA2Hg7ftAZ+Ateo7lrwuM1oFdAO2JeoG1wSwCGRTKcYHyjq6hztd7EnOTx5cgQdj4C2WJ+Fmi+gm13ubmoYPYWkFWvXk3NRxgasVU9E9hNsC2zdw= Received: by 10.48.226.15 with SMTP id y15mr762534nfg; Tue, 11 Jul 2006 11:06:21 -0700 (PDT) Received: by 10.49.64.11 with HTTP; Tue, 11 Jul 2006 11:06:21 -0700 (PDT) Message-ID: <255d8d690607111106k7bab2b5dl805babfee52d5a5b@mail.gmail.com> Date: Tue, 11 Jul 2006 13:06:21 -0500 From: "Dominique Devienne" To: "Ant Users List" Subject: Re: Line *Doesn't* Contain? In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20060711174002.77894.qmail@web55101.mail.re4.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Sure it does, in a way. Lines that don't contain a given substring or pattern are omitted, so 'modified' into 'null' strings. I do agree though that from a user stand-point, a negate attribute to and makes more sense. Matt, are a special kind of 'conditional' filters, saying yea or nay given a string, or don't otherwise modify the string. What might be more useful and generic would be a filter that used instances of a new StringCondition interface that could be combine with , , etc... just like condition. Just thinking out loud. This might be silly. --DD On 7/11/06, Aaron Davies wrote: > On 7/11/06, Matt Benson wrote: > > --- Aaron Davies wrote: > > > > > On 7/11/06, Dominique Devienne > > > wrote: > > > So which approach are you going to be taking? Adding > > > a "not" attribute > > > to the relevant filters sounds like the simplest to > > > me. > > > > I understand your position, but from my own viewpoint > > I would rather write a single "unmodified" > > FilterReader that nests another FilterReader than add > > negation logic to all Ant's existing built-in > > FilterReaders, plus place the burden on the author of > > any not yet written, imposing a handicap on any > > preexisting FilterReader implementation, etc., etc. > > Again, the concept of a single negation filter > > originated, as far as I know, with me (yes, I know > > it's impossible to have a truly original thought, but > > to the best I can tell I was the first person to > > suggest it in the context of Ant). It is a preference > > of mine to have small, reusable pieces... an echo of > > the Unix philosophy and probably relating to AOP as > > well. While my original concept of a filter was > > shown to be impractical, seems a fairly > > easy concept to grasp. Its most complex aspect would > > probably be the fact that it should have the ability > > to use tempfiles if applied to too-large data, but > > this could be left as a todo (I don't think most of > > Ant's built-in filters deal too well with HUGE input). > > > > So... in there you can find my answer and its > > justification. > > So how exactly would you use this with a grep? A simple > linecontains/linecontainsregexp doesn't modify the lines it matches, > AFAIK. > > > -Matt > > > > > > > > > By all means, be my guest Matt ;-) --DD > > > > > > > > On 7/11/06, Matt Benson > > > wrote: > > > > > --- Dominique Devienne > > > wrote: > > > > > > > > > > > this are not conditions, but filters. There's > > > no > > > > > > . > > > > > > > > > > > > I guess a negate attribute on > > > > > > > > > would be > > > > > > required, or a weird pseudo filter > > > that > > > > > > accept a nested > > > > > > filter, and 'reverses' the nested filter's > > > job, by > > > > > > accepting only > > > > > > lines unchanged by the nested filter. > > > > > > > > > > Hmm... I like that. Semantically superior to > > > > > > > > wrt to filters and covers all of what could > > > reasonably > > > > > be expected of the hypothetical "not filter." > > > Do you > > > > > want to write it or should I? ;) > > > > > > > > > > -Matt > > > > > > > > > > > > > > > > > Or some regexp wizardry of course. --DD > > > > > > > > > > > > On 7/11/06, Master, Tariq (Abbeywood) > > > > > > wrote: > > > > > > > > > > > > > > > > > > > > > I'm sure I read an example in the ant manual > > > using > > > > > > the element. > > > > > > > (having inet access issues so no direct > > > linke - > > > > > > sorry) > > > > > > > > > > > > > > > > > > > > > -----Original Message----- > > > > > > > From: Aaron Davies > > > [mailto:aaron.davies@gmail.com] > > > > > > > Sent: 11 July 2006 16:20 > > > > > > > To: Ant Users > > > > > > > Subject: Line *Doesn't* Contain? > > > > > > > > > > > > > > How can I do a negative filter in a > > > filterchain? > > > > > > I've tried to use a > > > > > > > negative lookahead regexp /.*(?!foo).*/, but > > > so > > > > > > far no luck. > > > > > > > -- > > > > > > > Aaron Davies > > > > > > > aaron.davies@gmail.com > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > > > > 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 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > __________________________________________________ > > > > > Do You Yahoo!? > > > > > Tired of spam? Yahoo! Mail has the best spam > > > protection around > > > > > http://mail.yahoo.com > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > > 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 > > > > > > > > > > > > > > > > > -- > > > Aaron Davies > > > aaron.davies@gmail.com > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: > > > user-unsubscribe@ant.apache.org > > > For additional commands, e-mail: > > > user-help@ant.apache.org > > > > > > > > > > > > __________________________________________________ > > Do You Yahoo!? > > Tired of spam? Yahoo! Mail has the best spam protection around > > http://mail.yahoo.com > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org > > For additional commands, e-mail: user-help@ant.apache.org > > > > > > > -- > Aaron Davies > aaron.davies@gmail.com > > --------------------------------------------------------------------- > 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