I am new to learning RE. Following is the python code snippet:
>>>m = re.match("([abc])+", "abc")
>>> m.group()
'abc' ..........(1)
>>> m.groups()
('c',) .........(2)
>>> m = re.findall("([abc])+", "abc")
>>> m
['c'] ..........(3)
From what I understand, m.group() ignores the presence of any parentheses and hence works like re.match("[abc]+", "abc"). This way (1) makes sense to me.
Please explain (2) and (3). Is it that in (2), the same subgroup keeps being over-written because there can be only one sub-group due to the presence of a single parenthesis?