0

I have a very large string in the form:

a1 + b1
a2 + b2
a3 + b3
.
.
.
an + bn

and I need to convert it to C array operations:

a[1]+b[1];
a[2]+a[2];
.
.
.
a[n]+b[n];

What regular expression are you suggesting and which tool? I was trying the regular expressions of jedit but I can switch if required.

Thanks a lot :)

kostaspap
  • 345
  • 4
  • 10

1 Answers1

1

Using jEdit:

search for:

([a-z]+)([0-9]+)

replace with:

$1[$2]
PyQL
  • 1,830
  • 3
  • 18
  • 22