ofxparser
ofxparser copied to clipboard
Fix incorrect regex for amount conversion.
The regex in Ofx::createAmountFromStr included a "?" after the "mark" whether it be decimal or comma. That "?" made it match number strings regardless of whether they had a "mark" to parse out, and grossly changed their value.
This made amounts such as 1000 or -1000 convert to 10 or -10. Removing the conditional after the mark resolved this issue. There are new tests to show that this resolves the issue without breaking others.
Resolves #19
I feel that it's fairly unlikely that many of the users are even aware that they are occasionally getting incorrect results. It would be rather difficult for someone to account for this behavior in their implementation of the library too.
Do you have a rough idea of when the next major release will be up?