`f_match` converted each match and capture offset to a codepoint index by walking from the start of the input, so `match(re; "g")`, `scan` and `capture(re; "g")` were quadratic in the number of matches. Count offsets from a cursor at the last converted position instead, stepping back when a capture starts before it (lookbehind, `\K`).