diff options
Diffstat (limited to 'lisp/ldg-regex.el')
-rw-r--r-- | lisp/ldg-regex.el | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/lisp/ldg-regex.el b/lisp/ldg-regex.el index 8e843ae5..83bc2197 100644 --- a/lisp/ldg-regex.el +++ b/lisp/ldg-regex.el @@ -61,13 +61,22 @@ "^--.+?\\($\\|[ ]\\)") (defconst ledger-account-any-status-regex - "^[ \t]+\\([*!]\\s-*\\)?\\([^ ;].*?\\)\\( \\|$\\)") + "^[ \t]+\\(?1:[*!]\\s-*\\)?\\(?2:[^ ;].*?\\)\\( \\|\t\\|$\\)") (defconst ledger-account-pending-regex - "\\(^[ \t]+\\)\\(!\\s-*.*?\\)\\( \\|$\\)") + "\\(^[ \t]+\\)\\(!\\s-*.*?\\)\\( \\|\t\\|$\\)") (defconst ledger-account-cleared-regex - "\\(^[ \t]+\\)\\(*\\s-*.*?\\)\\( \\|$\\)") + "\\(^[ \t]+\\)\\(*\\s-*.*?\\)\\( \\|\t\\|$\\)") + +(defconst ledger-metadata-regex + "[ \t]+\\(?2:;[ \t]+.+\\)$") + +(defconst ledger-account-or-metadata-regex + (concat + ledger-account-any-status-regex + "\\|" + ledger-metadata-regex)) |