javascript - VB or Kofax Script format string -


when have more 1 "xxx.xxx.xx" or "xxx,xxx,xx" how can replace result in format (1000,12)? need exemple language not important.

input test case:

1000 .12

1,000.12

1.000.12

1,000,12

1000,,12

1000.12

output: 1000,12

try this

            string[] inputs = { "1000.12", "1,000.12", "1.000.12", "1,000,12", "1000,,12", "1000.12" };             (int = 0; < inputs.count(); i++)             {                 inputs[i] = inputs[i].replace(".", "");                 inputs[i] = inputs[i].replace(",", "");                  string output = inputs[i].substring(0, inputs[i].length - 2) + "," + inputs[i].substring(inputs[i].length - 1);                 console.writeline(output);             }             console.readline(); 

Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - IE9 error '$'is not defined -