Re: Regular Expression Grouping

2007-08-12 Thread Paul McGuire
On Aug 12, 12:21 pm, [EMAIL PROTECTED] wrote: > > I cannot understand why 'c' constitutes a group here without being > surrounded by "(" ,")" ? > > >>>import re > >>> m = re.match("([abc])+", "abc") > >>> m.groups() > > ('c',) > It sounds from the other replies that this is just the way re's work

Re: Regular Expression Grouping

2007-08-12 Thread Michael J. Fromberger
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] wrote: > 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")

Re: Regular Expression Grouping

2007-08-12 Thread Steve Holden
[EMAIL PROTECTED] wrote: > 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',) > > Grat

Re: Regular Expression Grouping

2007-08-12 Thread linnewbie
On Aug 12, 1:31 pm, Fabio Z Tessitore <[EMAIL PROTECTED]> wrote: > Il Sun, 12 Aug 2007 17:21:02 +, linnewbie ha scritto: > > > 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 > > surro

Re: Regular Expression Grouping

2007-08-12 Thread Duncan Booth
[EMAIL PROTECTED] wrote: > 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',) > > Grat

Re: Regular Expression Grouping

2007-08-12 Thread Fabio Z Tessitore
Il Sun, 12 Aug 2007 17:21:02 +, linnewbie ha scritto: > 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") >