Hello Tamás,
would you provide an sample impl in playground, e.g. combining patterns "ab", "ac", "bc" into "(ab)|(ac)|(bc)" and then matching input string "zabc" ?
We're expecting something like [true, false, true], or ["ab", "bc"], or equivalent.
I tried but got stuck because :
- returned indexes denote positions in the matched string, not in the regexp,
- Submatch methods (without All) consider only the leftmost match,
- AllSubmatch method consider only non-overlapping matches, which defeats the purpose of matching the same input fragment 10000 times.
Using concatenation to build an uber-regexp (10000x longer) makes perfect sense, I think. On the other hand, I don't contemplate concatenating 10000 times the input string (wouldn't be more efficient than the naive loop approach). Also, we won't try to concatenate 800 millions of something into 1 single string.