0
What would be the result of len(match.groups()) of a match of (a)(b(?:c)(d)(?:e))?
help me
2 ответов
+ 2
There are 5 parentheses in the example, which means 5 groups.
However, two of them are marked with '?:', which means that they are non-capturing (not counted in the result) - so the final answer is 5-2 = 3 groups.
+ 1
3