DEV Community

Discussion on: Regex was taking 5 days to run. So I built a tool that did it in 15 minutes.

 
matthewsj profile image
Jacob Matthews

Yes -- RE2 doesn't do backtracking precisely so that it can run faster, which is why I thought it would be an interesting comparison. Here is a page that describes the basic idea, and here is a larger pool of resources for efficient regex implementation (considering "real" regular expressions only, not PCRE-compatible regexes that may contain non-regular constructs that would need to be implemented with backtracking).