Replace() with string and Regex not replacing numbers/integers

Hey, there!
I have a bunch of variables that I need to change to different names.

Currently they’re ordered and stored in a scriptable object ‘data’ and held in my character objects as vars.

I’m replacing all of the .cs file instances of vars with the name held in data*.*
My code abstract is…
foreach(string assetPath in AssetDatabase.GetAllAssetPaths())
for(int v = 0; v < data.Count; v++)
string findText = “vars[” + i.tostring + “]”;
string replaceText = data*.name;*
string finalFile = File.ReadAllText(assetPath);
finalFile = finalFile.Replace(findText, replaceText);
File.WriteAllText(finalFile)
It finds all the instances of vars in each file perfectly fine (the actual code finds all instances of vars in the file first), but when I try to replace them with string.Replace or Regex.Replace it doesn’t work.
When I change replace text to something without numbers it seems to work.
What am I doing wrong?

Do you really need to do this in Unity? I’d always do any Find and Replace operations through an IDE - it’s trivial to do a Regex operation on all the files in a directory using Visual Studio, for example.

Turns out it was my fault.
I went over the code tons of times before posting this, but the way my loops were nested things weren’t being saved and re-read properly.
Anyways…
Nothing to see here.