Copy to Another excel but only the numbers


#1

Hi All,

Basically now i’m currently stuck with how to copy cell to another cell without bring the operators.
For example.
01.342.957.6-012.000 <-- The cell that i copied
013429576012000 <-- The expected result after i’m paste to another cell.

Is there any way to automate this?

Thanks


#2

Hi @delf,

value1=“01.342.957.6-012.000”
value1=Regex.Replace(value1, “[^0-9]+”, string.Empty)

Regards,
Arivu


#3

Hi Arivu,

Thanks for reply this. I try but still got error. Can you point me where my mistake?

Thanks


#4

Hi @delf,

in Assign activity use below one
Regex.Replace(value1.ToString(), "[^0-9]+", string.Empty)

Make sure you implemented System.Text.RegularExpressions

else you can directly use
System.Text.RegularExpressions.Regex.Replace(value1.ToString(), "[^0-9]+", string.Empty)

Regards,
Arivu


Split a string based on Regex
#5

Hi @arivu96

Thanks and its worked now…

best regards

Delf