Remove decimal seperators

Hello all! I have a number serie thats formatted 1,788,50 how can i remove the first “,” from all number series ? So it only keeps the last “,” to seperate the decimal

You can use something like :
“1,788,50”.Remove(“1,788,50”.IndexOf(","),1)

but what will happen if the number its 10,50 ?

It will remove that . Could you share some more sample numbers then?

its a dynamic number so everything from 1 - 100000, but it has to be 2 decimals if it has decimals. but when i run my current code it also splits the thousand with a “,” seperator :S

Test.xaml (7.1 KB)

1 Like

You can use the workflow attached by @Priyanka_Ramesh and replace the Regex used with: ,(?=\d*,)
This will replace all “,” as long as they are followed by numbers and another “,”
Test.xaml (7.1 KB)

1 Like

hm how would the format be ? (string, (?=\d*,))


Like this.

1 Like

aha so the replace would just keep its form ?

The Replace will be regReplace.Replace(str, “”) (without the ,1 at the end)

hi @langsem, i know its late

but i had also done it

u can check the workflow too
firstcommaremover.zip (22.4 KB)

Hope it helps

Nived N :robot:

Happy automation :slightly_smiling_face: :slightly_smiling_face: :slightly_smiling_face:

ThaNKS :slight_smile: THINK IT WORKED

Thanks, worked :smiley:

1 Like

Feeling great I can help you @langsem

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.