Hi all!
I need help with a Regex to find currency amounts that may or may not include “US” or “US$” before them.
The source text is not always identified as a number, and it contains dots that I want to turn into commas (for example 1.000.000, which I want to convert to 1,000,000).
So far, I've been able to find the text I want, but haven't been able to get the replacement expression to do what I need.
Search string:
US\$(\d+)\.(\d+)\.(\d+)
Finds: US$4.123.950
Replace string:
US$\$1,$2,$3
Replaces with: US$\4,123,950
The result I want is US$4,123,950. If I delete the slash, it returns US$1,123,950. If I delete one of the dollar signs, it returns US4,123,950.
And I haven't even started tackling the part of including “US” or “US$” only if the source does.
Any ideas?
thanks so much!
Becky