This smells like an
XY problem: The admittedly tiny piece of data looks like it may be JSON or something of the like. Is there a library you can use to parse the files so you don't have to manually mangle it? If so, while a rewrite may be required, you'll probably come out ahead in maintainability.