Doesn't capturing groups within non capturing groups work in regex?

Euhan
Fri, 28 Apr 2023 08:55:31 +0000
General Usage

I’m looking to capture a pattern like "=2.4.7.9_" and be able to extract the numbers.

I try to match it with r"=(\d+)(:\.(\d+))*_" but that doesn’t seem to work. I expect each number to end up in a capture group but instead it just doesn’t match at all. Why is this? What should I write instead?

6 posts - 2 participants