Regexs are case sensitive. ^liabilities not equal to ^Liabilities On Tue, Feb 26, 2013 at 6:28 AM, Herbert Mühlburger <[email protected]> wrote: > Hi John, > > Am 26.02.13 13:39, schrieb John Wiegley: > >> Those are regular expressions, so the ^ means "match from the very >> beginning >> of the account name". > > > Then I have a comment on the documentation as I had some issues on getting > my hands wet with ledger. ;-) > > My example ledger file was constructed as explained at page 9 of the pdf > documentation and looks as follows: > > 2004/09/29 My Employer > Assets:Checking $500.00 > Income:Salary > > 2004/09/30 Restaurant > Expenses:Dining $25.00 > Liabilities:MasterCard > > Calling on the command line: > > % ledger -f ledger-test.dat balance ^assets ^liabilities > > gives me am _empty_ response. Which is clear because in my ledger file the > account name does not start at the beginning of the line but one " " (space) > more to the right and the regular expression does not match the accounts. > > Calling > > $ ledger -f ledger-test.dat balance ^ assets ^ liabilities > > gives the following correct result: > > $500.00 Assets:Checking > $-25.00 Liabilities:MasterCard > -------------------- > $475.00 > > So it was quite confusing for me as I worked through the documentation and > had no idea why my file did not produce a result. > > I suggest, that the part of the documentation should take this into account > otherwise it is confusing for new users. > > Thank you very much and kind regards, > Herbert > > > > > > -- > > --- 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/groups/opt_out. > >
-- Craig, Corona De Tucson, AZ enderw88.wordpress.com -- --- 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/groups/opt_out.
