How to compile a regular expression that will search and replace characters from a string

Carlton Patterson 601 Reputation points
2020-12-02T18:26:28.923+00:00

Hello Community,

I hope I'm in the right forum for this question

I'm trying to compile a regular expression that will search for strings that exclude certain characters and and charaters to the discovered strings.

For example, the following string value has 6 leading 0's

000000120

The next string excludes the 0's

121
122

I would like a regular expression that can find strings without the leading 0's and then add the 0's to it.

Therefore, 121, and 122 would become 000000121 and 000000122.

Can you help with this?

Thanks

Carlton

Windows Sysinternals
Windows Sysinternals
A website that offers technical information and advanced system utilities to manage, troubleshoot, and diagnose Windows systems and applications.
873 questions
No comments
{count} votes