Hi,
I have a string value of “27726546122”
I need to replace the first 2 numbers with a zero
how would i assign the variable?
thanks
Hi,
I have a string value of “27726546122”
I need to replace the first 2 numbers with a zero
how would i assign the variable?
thanks
Welcome back to our UiPath community.
Input = "27726546122"
Output = Input.Replace(Input.SubString(0,2),"0")
Hi thanks ,
I tried but it only replaces the first number
Hope this helps…
give a try on “00” & YourString.SubString(2)
I updated the expression. Can you try now.
Simpler just to use the right function then add the 0 on the front.
myStr = “27726546122”
newStr = “0” + Right(myStr,myStr.Len - 2)
Try with regex and replace
Assign a string variable
System.Text.RegularExpressions.Regex.Replace("27726546122","^\d{2}","00")
Hope it Helps
Regards
Sudharsan
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.