On May 18, 2010, at 6:56 PM, John Wiegley wrote: > = /foo/ > (Expenses:Food) (any(account =~ /MasterCard/) ? amount * 0.10 : amount * > 0.20) > > If any posting's account matches the regex "foo", a virtual posting is > appended to that posting's transaction. If the account of the matched posting > matches "MasterCard", then the amount of the appended posting is that amount > increased by 10%, otherwise it is that amount increased by 20%.
Oops, I meant: If the account of *any* posting within the transaction of the matched posting matches the MasterCard account. The any() operator is brand new. :) John
