文章地址: https://blog.doyensec.com/
This visualisation of the matching steps was produced by emitting verbose debugging from cpython’s regex engine using my cpython fork.
文章当中说是通过 cpython 实现的,但是我用 debug 模式呈现不了他那样的效果。
1
aloxaf 2021-03-30 13:55:38 +08:00
regex101
|
2
phony2r 2021-03-30 14:08:25 +08:00
|
3
no1xsyzy 2021-03-30 14:21:49 +08:00
> This visualisation of the matching steps was produced by emitting verbose debugging from cpython’s regex engine using my cpython fork.
他用了一个自己的 fork,在 regex 引擎中产生了更多的信息。 |
5
DaFee OP 提供点思路就行
|
6
no1xsyzy 2021-03-30 19:23:40 +08:00
https://github.com/bcaller/cpython/compare/fbc7723..2c67561
还有这个 commit message: https://github.com/bcaller/cpython/commit/bc453d1 没研究过 CPython 源代码,以下表述来源于技能“直觉 EX+” 首先,打开 VERBOSE 之类的符号,并且在许多地方嵌入 TRACE 然后用 spit.py 来 parse 输出。 |