Regular Expression Grouping

linnewbie at gmail.com linnewbie at gmail.com
Sun Aug 12 13:21:02 EDT 2007


Fairly new to this regex thing, so this might be very juvenile but
important.

I cannot understand and why 'c' constitutes a group here without being
surrounded by "(" ,")" ?

>>>import re
>>> m = re.match("([abc])+", "abc")
>>> m.groups()
('c',)

Grateful for any clarity.




More information about the Python-list mailing list