Skip to main content
minor English corrections
Source Link
Justin
  • 87.2k
  • 49
  • 231
  • 372

Suppose I have string like this ".1.12.3.4.12.4."

As a result I would like to get ".01.12.03.04.12.04."

As you can see, I want all numbers of length == 1 to become of length == 2 with zero at the beginning. How can I achieve this?

Thanks in advance

Suppose I have string like this ".1.12.3.4.12.4."

As a result I would like to get ".01.12.03.04.12.04."

As you can see, I want all numbers of length == 1 to become of length == 2 with zero at the beginning. How can I achieve this?

Thanks in advance

Suppose I have string like this ".1.12.3.4.12.4."

As a result I would like to get ".01.12.03.04.12.04."

As you can see, I want all numbers of length == 1 to become of length == 2 with zero at the beginning. How can I achieve this?

Suppose I have string like this ".1.12.3.4.12.4." As

As a result i wantI would like to get ".01.12.03.04.12.04." As

As you can see i, I want all numbers of length == 1 to become of length == 2 with zero inat the beginnningbeginning. How can I achiveachieve this?

Thanks in advance

Suppose I have string like this ".1.12.3.4.12.4." As a result i want to get ".01.12.03.04.12.04." As you can see i want all numbers of length == 1 to become of length == 2 with zero in the beginnning. How can I achive this?

Suppose I have string like this ".1.12.3.4.12.4."

As a result I would like to get ".01.12.03.04.12.04."

As you can see, I want all numbers of length == 1 to become of length == 2 with zero at the beginning. How can I achieve this?

Thanks in advance

Source Link
Giorgi Nakeuri
  • 35.9k
  • 8
  • 50
  • 78

Replace part of matched string with Regex.Replace

Suppose I have string like this ".1.12.3.4.12.4." As a result i want to get ".01.12.03.04.12.04." As you can see i want all numbers of length == 1 to become of length == 2 with zero in the beginnning. How can I achive this?