On Aug 8, 10:21 pm, John Wiegley <[email protected]> wrote:
> rjc <[email protected]> writes:
> > If that's not directly possible I think I could live with the
> > workaround:
>
> Ah. You can do this with value expressions if you are using the latest
> version of Ledger from Git:
>
> = /^Asset:Checking/&p/Buying Shares/
> (Virtual Account) (-1 EUR * amount)
Thanks. That didn't work as is with 3.0.0-20110325 but it did lead me
to the following, which does seem to work.
= /^Asset:Shares/
(Virtual Account) ($1 * amount * P(1 Units))
I think the reason that your version didn't work is that "= /
^Asset:Checking/&p/Buying Shares/" doesn't seem to match anything.
Looking through the archives it seems that the syntax has changed. I
tried
= expr account =~ /^Asset:Checking/ & payee =~ /^Buying Shares/
(Temp) 1
but that seems to match *everything*. IS that a bug in ledger or me
not understanding the syntax? Is the new syntax documented anywhere?
- Richard