Quantcast
Channel: Active questions tagged utf-8 - Stack Overflow
Viewing all articles
Browse latest Browse all 1142

re.findall() in python for escape sequences [duplicate]

$
0
0

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?


Viewing all articles
Browse latest Browse all 1142

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>