<https://discuss.kotlinlang.org/t/feature-request-...
# forum
r
[Feature request] Regex findAll with overlap I ran into an annoyance today where findAll did not match overlapping parts. This is sane, to be fair. But having alternative behavior would be nice. Can we get a findAllWithOverlap defined as follows?: fun findAllWithOverlap(input: CharSequence, startIndex: Int = 0): Sequence { if (startIndex < 0 || startIndex > input.length) { throw IndexOutOfBoundsException("Start index out of bounds: $startIndex, input length: ${input.length}") } return...