How to remove character in the middle of the string

hi Good Day,

how to remove character in the middle of the string inside datatable

I need to remove “0” after AP

Expected Output
AP77003
AP77027
AP77058

Thank you in advance
-VIncent

1 Like

Hi @Vincent_Nuestro ,

Read your file and loop your datatable in for each and inside the loop in assign activity,
Use this below expression,
row("Your Ref") = New Regex("0").Replace(row("Your Ref").ToString.Trim, "",1)

Hope this helps :slight_smile:

do this @Vincent_Nuestro
System.Text.RegularExpressions.Regex.Replace("AP0132409","[A-Z]{2}([0])","")

hi @Manish540

Hi @Vincent_Nuestro ,

Try this below expression and let us know,
New System.Text.RegularExpressions.Regex("0").Replace(CurrentRow(2).ToString.Trim, "",1)

4 Likes

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