data = re.sub(r'.*"md5": ', '', data, 1)
I am trying to use this in the first occurrence of a text file but it is starting from the last occurrence, executing backwards. So, when I do:
r = re.match('(.*?)}{"id": "', data).group()
It returns AttributeError: 'NoneType' object has no attribute 'group' because id always appears before md5.
There is a way to revert this?