From c4fdb5c6091ca04fdfc34efdd4f6522ea295bb3a Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Tue, 9 Mar 2010 23:49:20 +0000 Subject: [PATCH] docs: more about filter patterns --- MANUAL | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/MANUAL b/MANUAL index f0a39e857..71b20c417 100644 --- a/MANUAL +++ b/MANUAL @@ -465,13 +465,21 @@ Filter patterns """"""""""""""" Most commands accept one more filter pattern arguments after the command -name. In this case, hledger will look only at postings which match any of -the patterns. Each pattern is a regular expression which is matched -against the posting's account. Or, a pattern prefixed with ``desc:`` is -matched against the posting's transaction's description. +name, to select a subset of transactions or postings. There are two kinds +of pattern: -To negate a pattern, prefix it with ``not:``. Note: with multiple -prefixes, not: should go last, eg: ``desc:not:someregexp``. +- an account pattern, which is a regular expression. This is matched + against postings' accounts. Optionally, it may be prefixed with ``not:`` + in which case the match is negated. + +- a description pattern, like the above but prefixed with ``desc:``. This + is matched against transactions' descriptions. Note how with multiple + prefixes, not: goes last, eg: ``desc:not:someregexp``. + +When you specify multiple filter patterns, hledger selects the +transactions or postings which match + + *any of the account patterns* AND *any of the description patterns* Dates """""