Using Document Understanding process, I’ve extracted data from a dataset of invoices.
I have a problem with one specific input data from an invoice.
It looks like this: eg. 3,329.86 and it represents a Total.
In order to insert this Total into system I have to rewrite it as: 3.329,86 to be processed as a correct value.
My question is: How can I use .Replace(valueToBeReplaced, replaceValue) in order to make this change of the input data in the same time even for ‘,’ and for ‘.’ ?
As a resume, I have to change the input ‘,’ with ‘.’ and the input ‘.’ with ‘,’.
1. replace ,/. with something else
txt = txt.Replace(",", "COMMA")
txt = txt.Replace(".", "FULLSTOP")
2. now we can perform the actual replace
txt = txt.Replace("COMMA", ".")
txt = txt.Replace("FULLSTOP", ",")