It’s not quite so simple - the above benchmarks show this is slower when there are few matches.
I think the generic implementation is fine, but could be improved by (a) adding specialised implementations of findnext and (b) replacing findnext with a new function that returns the index of first character after the match, since any implementation must already know this information and it avoids the expensive nextind call.