Try using '!' instead of 'not'. 

> On Apr 10, 2014, at 10:04 PM, [email protected] wrote:
> 
> Hi,
> 
> I have the following automatic transaction:
> 
> = expr (account =~ /Phone/ & account =~ /Expense/ & not account =~ /New/)
>     [Budget:$account]                -1 
>     [Assets:First Savings Account]    1 
> 
> Basically, I want it to match any posting whose account has both "Phone" and 
> "Expense" in it, but NOT "New".
> 
> This doesn't work. It doesn't match any transaction posted to Expense:Phone
> 
> Now if I make it
> 
> = expr (account =~ /Phone/ & account =~ /Expense/)
>     [Budget:$account]                -1 
>     [Assets:First Savings Account]    1 
> 
> It does match. 
> 
> So the negation is screwing things up. Is this a bug or is there a better 
> query?
> 
> Using Ledger 3.0.0-20130529
> 
> Thanks. 
> -- 
> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Ledger" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to