How to remove zeros between 2 digits?

Hi,
I have invoice numbers such as TA000001234, TA000000234, TA00000201, TA0000021
I want to remove all zeros between A and firs integer for example I want to get numbers TA1234, TA234,TA201, TA21.
Thank you.

Hi @makboga

You can try with Regex Expression

System.Text.RegularExpressions.Regex.Replace(YourString,"(?<=TA)0+","").Tostring

image

Regards
Gokul

2 Likes

Another regex expression

System.Text.RegularExpressions.Regex.Replace(YourString,"(?<=[A-Z])0+","").Tostring

Regards
Gokul

It worked thank you.

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