Page 1 of 1

Parsing dollar amount (comma vs no comma separator)

PostPosted: Thu Feb 11, 2021 6:49 pm
by iSilentP
I just upgraded to the v5 Hazel thinking that I needed to start using lists and tables to solve for this. I can not figure out how to solve this.

I need to parse a PDF statement that has a value which sometimes is the hundreds and other times in the thousands. The difference is that the thousands value has the comma "," as a separator (1,903). In the instance where the value is in the hundreds, no comma.

Any idea of how to get this to work would be appreciated.

Comma (thousands) sample:
https://www.screencast.com/t/SSdFmtvjjoj

Non-comma sample:
https://www.screencast.com/t/s0PikOVql

The pattern I have defined that works for me for the thousands (comma) sample:
https://www.screencast.com/t/mgTFh7Zsu

Re: Parsing dollar amount (comma vs no comma separator)

PostPosted: Fri Feb 12, 2021 10:41 am
by Mr_Noodle
For now, you'll have to use separate patterns to match each case. I'll consider having options in the future where it can handle thousands separators.

Re: Parsing dollar amount (comma vs no comma separator)

PostPosted: Fri Feb 12, 2021 12:40 pm
by iSilentP
Thanks for the reply. I'll stop pounding my head against the wall---for now.