I was trying to find out all escape sequences in a file but failed. This is a minimal reproducible example:
Code:
import rematches = re.findall(r'"(\\\d+)+"', r'"\123\124\125"')print(matches)
Expected result:
['"\123\124\125"']
Observed result:
['\\125']
Why?