Neat trick from stackoverflow: the re.DEBUG flag for python regexes:
> re.compile('a(b+)a', re.DEBUG)
literal 97
subpattern 1
max_repeat 1 65535
literal 98
literal 97
July 5th, 2010 § 0 comments
Neat trick from stackoverflow: the re.DEBUG flag for python regexes:
> re.compile('a(b+)a', re.DEBUG)
literal 97
subpattern 1
max_repeat 1 65535
literal 98
literal 97
You are currently reading debugging python regexes at Dan O'Huiginn.
Designed by pnts
Powered by WordPress