Jonathan Kolberg
12/03/2023, 7:20 AMval result = "44".toRegex().findAll("14446")
why is result only of length one, in my understanding it should match 1$44$45
and 14$44$5
. Here I marked the match visually with $
ephemient
12/03/2023, 7:20 AMfindAll
does not return overlapping matchesephemient
12/03/2023, 7:22 AM".+".toRegex().findAll("abc")
only returns the single run of abc
, not abc
bc
c
Jonathan Kolberg
12/03/2023, 7:23 AMephemient
12/03/2023, 7:40 AMfind(startIndex=)
to match.range.first + 1
ephemient
12/03/2023, 7:41 AMgenerateSequence(regex.find(str)) { regex.find(str, startIndex = it.range.first + 1) }
Johann Pardanaud
12/03/2023, 9:50 AMJohann Pardanaud
12/03/2023, 9:51 AM