More regex fine tuning
This commit is contained in:
parent
9b5289c3e9
commit
15e84cbb18
1 changed files with 8 additions and 8 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue