-1

I have lines of code like this:

A[1]
B[2]
C[3]
D[4]
E[5]
F[6]
G[7]
H[8]
I[9]
J[10]
K[11]
.
.
.

Now, how can I find and replace all these integers with their incremented number using Regular Expressions so that the result would be like this:

A[2]
B[3]
C[4]
D[5]
E[6]
F[7]
G[8]
H[9]
I[10]
J[11]
K[12]
.
.
.
Ali Shahzad
  • 5,163
  • 7
  • 36
  • 64

1 Answers1

-1

In order to do this use System.Text.RegularExpressions.Regex.Replace() which takes a callback.

Ωmega
  • 42,614
  • 34
  • 134
  • 203