Add 1 Character to String

Hi Everyone
I have a code S00234567 i want result as S000234567
can you help me

1 Like

Hi @Apchu

Try this


Ashwin S

1 Like

if the input is stored in a variable named strinput
then the output in assign activity will be like, which can take zeros only from the beginning

stroutput = System.Text.RegularExpressions.Regex.Replace(strinput.tostring,"(\d)+",system.Text.RegularExpressions.Regex.Match(strinput.ToString,"(\d)+").ToString.PadLeft(strinput.length,CCHAR(“0”)))

it worked as well

Cheers @Apchu

Hi @Apchu

You can read this article it might be helpful to you.

cheers :smiley:

Happy learning :smiley:

1 Like