Replacing string with number sequence

Joined
Jul 12, 2013
Messages
1
Reaction score
0
I have a very long document like this:

circuit_reference 1
klfjaksld = -9*Ax+6*Bx+OffsetX
end circuit_reference

circuit_reference 2
fgsdfger = -9*Ax+7*Bx+OffsetX
end circuit_reference

circuit_reference 3
wefasdf = -8*Ax+4*Bx+OffsetX
end circuit_reference

and I want to replace "OffsetX" with "Offset(i)", where "i" is the sequence in which the string "Offset" appears such that the result will look like this:

circuit_reference 1
klfjaksld = -9*Ax+6*Bx+OffsetX(1)
end circuit_reference

circuit_reference 2
fgsdfger = -9*Ax+7*Bx+OffsetX(2)
end circuit_reference

circuit_reference 3
wefasdf = -8*Ax+4*Bx+OffsetX(3)
end circuit_reference

is there anyway to add sequence numbers in the "Replace with" field in MS word to perform this? or are there any other text editors which will do this? Many Thanks!
 
Back
Top