Regexp engine with parsing, Thompson NFA (polynomial time) in 76 lines of Python | Heykuki News