Here's a simple named group matching pattern:
s = 1,2,3
p = re.compile(r(?Pone\d),(?Ptwo\d),(?Pthree\d))
m = re.match(p, s)
m
_sre.SRE_Match object at 0x011BE610
print m.groups()
('1', '2', '3')
Is it possible to call the group names, so that I can iterate over
them?
The result I'm looking
Brian D wrote:
Here's a simple named group matching pattern:
s = 1,2,3
p = re.compile(r(?Pone\d),(?Ptwo\d),(?Pthree\d))
m = re.match(p, s)
m
_sre.SRE_Match object at 0x011BE610
print m.groups()
('1', '2', '3')
Is it possible to call the group names, so that I can iterate over
them?
* Brian D:
Here's a simple named group matching pattern:
s = 1,2,3
p = re.compile(r(?Pone\d),(?Ptwo\d),(?Pthree\d))
m = re.match(p, s)
m
_sre.SRE_Match object at 0x011BE610
print m.groups()
('1', '2', '3')
Is it possible to call the group names, so that I can iterate over
them?
The result
Brian D wrote:
Here's a simple named group matching pattern:
s = 1,2,3
p = re.compile(r(?Pone\d),(?Ptwo\d),(?Pthree\d))
m = re.match(p, s)
m
_sre.SRE_Match object at 0x011BE610
print m.groups()
('1', '2', '3')
Is it possible to call the group names, so that I can iterate over
them?
On Jan 19, 11:28 am, Peter Otten __pete...@web.de wrote:
Brian D wrote:
Here's a simple named group matching pattern:
s = 1,2,3
p = re.compile(r(?Pone\d),(?Ptwo\d),(?Pthree\d))
m = re.match(p, s)
m
_sre.SRE_Match object at 0x011BE610
print m.groups()
('1', '2', '3')
Is it
On Jan 19, 11:51 am, Brian D brianden...@gmail.com wrote:
On Jan 19, 11:28 am, Peter Otten __pete...@web.de wrote:
Brian D wrote:
Here's a simple named group matching pattern:
s = 1,2,3
p = re.compile(r(?Pone\d),(?Ptwo\d),(?Pthree\d))
m = re.match(p, s)
m
_sre.SRE_Match
Brian D wrote:
Here's a simple named group matching pattern:
s = 1,2,3
p = re.compile(r(?Pone\d),(?Ptwo\d),(?Pthree\d))
m = re.match(p, s)
m
_sre.SRE_Match object at 0x011BE610
print m.groups()
('1', '2', '3')
Is it possible to call the group names, so that I can iterate over
them?
The