Given the following string:
MY_VALUE=100OtherData=200
And this regex:
regex = r"MY_VALUE=(?P<value>\d+)"
How can I use re.sub
to replace the content of the captured group value
without specyfing MY_VALUE
before it, so it will result in:
MY_VALUE=200OtherData=200