Hi, I'm trying to replace some characters within a lyrx file.
In this example I need to replace "570" with "560"
The problem I have is that two lines are identical but I only need to replace one (highlighted in yellow in the image below) and not the one a few lines above the highlighted one.
The code I'm using:
for i, line in enumerate(fileinput.input(OUT_workspace + "\\" + "AE000S560_005M5001P01M041.lyrx", inplace=1)):
sys.stdout.write(line.replace('"max" : 570', '"max" : 560'))
I would really appreciate any help. I'm not sure how to target a specific line within the file. Many thanks.
