P
PoulsenL
I have a number of text fields with different ways of exressing currency.
Examples:
1 512,3 M
0.214,0 m
1 123 k
1,234,567
1.235.458,90
1,234,324 m (Where in this case m is to be conveyed as k. My only check is
to look at the final number and adjust by /1000 if greater than say 1
billion)
12,456 M [Tab] 67,897 k (where these numbers represent two different
scenarios)
1) [Tab] 0.456,9 M [CR] 2) [Tab] 45.879,0 M (where these numbers represent
two different scenarios)
plus a few other creative ways to express currency. I have written a re
that covers each case and, using matched groups, puts things back together
using the US convention but I was hoping for a cleaner more pythonic (read:
more readable) solution.
Thanks in advance,
Loren
Examples:
1 512,3 M
0.214,0 m
1 123 k
1,234,567
1.235.458,90
1,234,324 m (Where in this case m is to be conveyed as k. My only check is
to look at the final number and adjust by /1000 if greater than say 1
billion)
12,456 M [Tab] 67,897 k (where these numbers represent two different
scenarios)
1) [Tab] 0.456,9 M [CR] 2) [Tab] 45.879,0 M (where these numbers represent
two different scenarios)
plus a few other creative ways to express currency. I have written a re
that covers each case and, using matched groups, puts things back together
using the US convention but I was hoping for a cleaner more pythonic (read:
more readable) solution.
Thanks in advance,
Loren