diff options
author | Craig Earls <enderw88@gmail.com> | 2013-04-10 15:48:39 -0700 |
---|---|---|
committer | Craig Earls <enderw88@gmail.com> | 2013-04-10 15:48:39 -0700 |
commit | 15e84cbb18ff2e0423e20c3a620631c3ce97956c (patch) | |
tree | 3ba2765397c7e5cddefe888452de64b81e3f0085 | |
parent | 9b5289c3e9c0d6a123f15a8a65def046bb823779 (diff) | |
download | fork-ledger-15e84cbb18ff2e0423e20c3a620631c3ce97956c.tar.gz fork-ledger-15e84cbb18ff2e0423e20c3a620631c3ce97956c.tar.bz2 fork-ledger-15e84cbb18ff2e0423e20c3a620631c3ce97956c.zip |
More regex fine tuning
-rw-r--r-- | lisp/ldg-context.el | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lisp/ldg-context.el b/lisp/ldg-context.el index 510a4cfa..ccaa39f2 100644 --- a/lisp/ldg-context.el +++ b/lisp/ldg-context.el @@ -32,10 +32,10 @@ ;; form the regex and list of elements (defconst indent-string "\\(^[ \t]+\\)") (defconst status-string "\\([*! ]?\\)") -(defconst account-string "[\\[(]?\\(.*?\\)[])]?[ \t]\\{2\\}") +(defconst account-string "[\\[(]?\\(.*?\\)[])]?") (defconst amount-string "[ \t]?\\(-?[0-9]+\\.[0-9]*\\)") (defconst comment-string "[ \t]*;[ \t]*\\(.*?\\)") -(defconst nil-string "[ \t]+") +(defconst nil-string "\\([ \t]+\\)") (defconst commodity-string "\\(.+?\\)") (defconst date-string "^\\(\\([0-9]\\{4\\}[/-]\\)?[01]?[0-9][/-][0123]?[0-9]\\)") (defconst code-string "\\((\\(.*\\))\\)?") @@ -70,12 +70,12 @@ (list (list 'xact (list (single-line-config date nil status nil nil code payee comment) (single-line-config date nil status nil nil code payee))) (list 'acct-transaction (list (single-line-config indent comment) - (single-line-config indent status account commodity amount nil comment) - (single-line-config indent status account commodity amount) - (single-line-config indent status account amount nil commodity comment) - (single-line-config indent status account amount nil commodity) - (single-line-config indent status account amount) - (single-line-config indent status account comment) + (single-line-config indent status account nil commodity amount nil comment) + (single-line-config indent status account nil commodity amount) + (single-line-config indent status account nil amount nil commodity comment) + (single-line-config indent status account nil amount nil commodity) + (single-line-config indent status account nil amount) + (single-line-config indent status account nil comment) (single-line-config indent status account))))) (defun ledger-extract-context-info (line-type pos) |