Re:A Regular Expression Matcher (2007)
by eutectic on Thursday August 25, 2022 @11:42AM
(#32595268)
I don't know about beautiful, but I just came up with this small NFA matcher for the same problem:
[ Parent
| on HN ]
Re:A Regular Expression Matcher (2007)
by abecedarius on Friday August 26, 2022 @10:48AM
(#32608246)
Nice! I should've expected this could be that short, but I didn't.
Here's my favorite approach to "rediscovering" efficient regex matching: https://semantic-domain.blogspot.com/2013/11/antimirov-deriv... It's implicit in the Thompson paper I linked above, but imo not obvious from it.