2 ms·
> common regex APIs that either return the end position (Python's re.match) or search (re.search). Yeah, I probably should have explicitly said that's what the
by a1369209993 5y ago
> common regex APIs that either return the end position (Python's re.match) or search (re.search).
Yeah, I probably should have explicitly said that's what the first translation (`[^a]|a[^b]|ab[^c]|...`) was for; it's a optimization (possibly-backtracking-parser -> [ND]FA) I've used a couple of times to beat things into guaranteed O(N) time.
> But parsing / capturing is more relevant to programmers.
I'd debate "more", since that's a additional thing on top of matching and searching. Any case where you need the former, you also need the latter to even know what to capture. But it's definitely something you do frequently need.