I have a regex that can match a string in multiple overlapping possible ways. However, it seems to only capture one possible match in the string, how can I get all possible
If you want to detect overlapping matches, you'll have to implement it yourself - essentially, for a string foo
ifoo[i+1:]It gets trickier if you're using arbitrary-length capture groups (e.g. (.*)) because you probably don't want both foo-foobar and oo-foobar as matches, so you'd have to do some extra analysis to move i even farther than just +1 each match; you'd need to move it the entire length of the first captured group's value, plus one.