regular expression argument that contains spaces

13 views
Skip to first unread message

thierry

unread,
Mar 1, 2010, 4:08:35 PM3/1/10
to Ledger
I found an unexpected result while using the "reg" command, with
regular expression argument to specify account.
The ledger v3 result is not filtered (unexpected), while the ledger v2
result is correct.
What is the correct way to specify regular expressions?

Thanks
Thierry


$ ledger3 --european -w -f test6.ledger reg "Frais financiers"
09-Jan-12 Banque Accord Dépense:Frais
financiers:Autres frais 45,00 € 45,00 €
09-Sep-09 Aéroport Dépense:Frais
professionnels:Remboursés 15,00 € 60,00 €

$ ledger -w -f test6.ledger reg "Frais financiers"
2009/01/12 Banque Accord Dépense:Frais
financiers:Autres frais 45,00 € 45,00 €


$ cat test6.ledger
2009/01/12 * Banque Accord
Dépense:Frais financiers:Autres frais 45,00 €
Passif:Crédit:Banque Accord

2009/09/09 ! Aéroport
Dépense:Frais professionnels:Remboursés 15,00 €
Passif:Crédit:Airbus:BNP Visa


$ ledger -v
Ledger 2.6.2, the command-line accounting tool
$ ledger3 -v
Ledger master-0-g5471370, the command-line accounting tool

John Wiegley

unread,
Mar 1, 2010, 4:13:49 PM3/1/10
to ledge...@googlegroups.com
Hmm... I never expected people to use spaces in unquoted regexps.... You can do this:

"/Frais financiers/"

But I suppose space should be allowable too.

John

Reply all
Reply to author
Forward
0 new messages