Re:Building a Regex Engine in Fewer Than 40 Lines of Code
by perlgeek on Tuesday December 05, 2017 @05:48AM
(#15851012)
In my experience, it's the edge cases that are a pain when implementing a regex engine. Think about weird regexes like "^*", "$?" (or any quantified zero-width match), anchors that appear in the middle of regexes, nested quantifiers (don't make much sense, but you need to generate good error messages).
Once you add captures and maybe even backreferences, you get a whole new world of weird :-)
Once you add captures and maybe even backreferences, you get a whole new world of weird :-)