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

Carlton Patterson 601 Reputation points

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


The next string excludes the 0's


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?



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