5 Cool Coding Challenges from Beginner to Advanced PDF·EPUB·Paperback
⟵ prev Contents next ⟶

🆕 This chapter is part of the WIP book:
5 Cool Coding Challenges from Beginner to Advanced

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.


⟵ prev Contents next ⟶