String.Join(",",values.Replace("0","").Where(Function(x) Char.IsDigit(x)))

i am using this condition to replace 0 its working good for single character but its splitting when we have values as 22 its giving as 2,2

inititially values is a string variable that may contain single or double digit numbers
ex: values = 1,1,1,0,1
after this condition String.Join(",",values.Replace(“0”,"").Where(Function(x) Char.IsDigit(x)))
values = 1,1,1,1 (correct)

but i want to make sure that when values has any non zero double digit its should not split

@manojv02500 - is this the expected output??

image

If yes, Please add system.text.regularexpressions in the import tab and try…or else regex.replace command will thrown an error. OR Try the below…