Hello guys,
What I need is to parce my projects' resource files and change its version number. I have a working JS script but I would like to implement it with python.
So, the problem stands in using re.sub:
version = "2,3,4,5"
modified_str = re.sub(r"(/FILEVERSION )\d+,\d+,\d+,\d+(\s)/g", version, str_text)
I understand that because of using capturing groups my code is incorrect. And I tried to do smth like:
modified_str = re.sub(r"(/FILEVERSION )(\d+,\d+,\d+,\d+)(\s)/g", r"2,3,4,5\2", str_text)
And still no effect. Please help!