π This chapter is part of the WIP book:
Miscellaneous build-your-own-X projects Subscribe to get notified of new chapters and the book's release.
Miscellaneous build-your-own-X projects Subscribe to get notified of new chapters and the book's release.
π₯ My other Book: Build Your Own Redis
Project R: Regular Expression Engines
Regular expressions are not magic. You can understand them by building one regex engine or two by yourself.
Itβs not that hard. We can parse regex with about 100 lines of Python, and execute regex with about 50 lines of backtracking. And for intermediate readers, code an NFA with about 100 lines of Python.
- R1. Parsing Regular Expressions (Beginner)
- R2. Regex via Backtracking (Beginner)
- R3. Graph Traversal and Regex (Intermediate)
- R4. Deterministic Finite Automaton (Advanced)
( Report an Error | Ask a Question) @ build-your-own.org