Fix amount-regex to properly capture integer part.
If the integer part was 2 digits, because the integer part was non-greedy, it only captured as much as necessary, namely one digit. The other digit was captured by the 5th group's [:word:] not 4th because that one is also optional. This results in incorrect reporting of amount length and broken aligning. Also move the decimal dot matching from 3rd group to 4th, and quote the dot.
This commit is contained in:
parent
5f2f8e50b3
commit
758a224131
1 changed files with 2 additions and 2 deletions
|
|
@ -27,8 +27,8 @@
|
|||
(defconst ledger-amount-regex
|
||||
(concat "\\( \\|\t\\| \t\\)[ \t]*-?"
|
||||
"\\([A-Z$€£₹_(]+ *\\)?"
|
||||
"\\(-?[0-9,\\.]+?\\)"
|
||||
"\\(.[0-9)]+\\)?"
|
||||
"\\(-?[0-9,]+\\)"
|
||||
"\\(\\.[0-9)]+\\)?"
|
||||
"\\( *[[:word:]€£₹_\"]+\\)?"
|
||||
"\\([ \t]*[@={]@?[^\n;]+?\\)?"
|
||||
"\\([ \t]+;.+?\\|[ \t]*\\)?$"))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue