--- Aaron Davies <[EMAIL PROTECTED]> wrote: > On 7/11/06, Matt Benson <[EMAIL PROTECTED]> > wrote: [SNIP] > > 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 [SNIP] > So how exactly would you use this with a grep? A > simple > linecontains/linecontainsregexp doesn't modify the > lines it matches, > AFAIK. >
Hmm. Good question! :) Let's think this through. The way to negate a "grep" is to pass through, unmodified, any line modified by the grep, and suppress any line _not_ modified. But the original definition of <unmodified> was to let through only lines not modified by the nested filter. So these definitions are at odds with one another. Are there any other use cases for negation other than negation of line contains type filters? Maybe it would be best (if unexciting) to add negation logic to these few classes. :( > > -Matt > > > > > > > > > By all means, be my guest Matt ;-) --DD > > > > > > > > On 7/11/06, Matt Benson <[EMAIL PROTECTED]> > > > wrote: > > > > > --- Dominique Devienne <[EMAIL PROTECTED]> > > > wrote: > > > > > > > > > > > this are not conditions, but filters. > There's > > > no > > > > > > <not>. > > > > > > > > > > > > I guess a negate attribute on > > > <linecontains[regexp]> > > > > > > would be > > > > > > required, or a <unchanged> 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 > > > <not> > > > > > 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) > > > > > > <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > > > > > > > > > > I'm sure I read an example in the ant > manual > > > using > > > > > > the <not> element. > > > > > > > (having inet access issues so no direct > > > linke - > > > > > > sorry) > > > > > > > > > > > > > > > > > > > > > -----Original Message----- > > > > > > > From: Aaron Davies > > > [mailto:[EMAIL PROTECTED] > > > > > > > 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 > > > > > > > [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > > > > To unsubscribe, e-mail: > > > > > > [EMAIL PROTECTED] > > > > > > > For additional commands, e-mail: > > > > > > [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > > > To unsubscribe, e-mail: > > > > > > [EMAIL PROTECTED] > > > > > > For additional commands, e-mail: > > > > > > [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > __________________________________________________ > > > > > Do You Yahoo!? > > > > > Tired of spam? Yahoo! Mail has the best > spam > > > protection around > > > > > http://mail.yahoo.com > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > > To unsubscribe, e-mail: > > > [EMAIL PROTECTED] > > > > > For additional commands, e-mail: > > > [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > > > To unsubscribe, e-mail: > > > [EMAIL PROTECTED] > > > > For additional commands, e-mail: > > > [EMAIL PROTECTED] > > > > > > > > > > > > > > > > > -- > > > Aaron Davies > > > [EMAIL PROTECTED] > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: > > > [EMAIL PROTECTED] > > > For additional commands, e-mail: > === message truncated === __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]