Hello everyone,
Is there a bug in re.findall in Python 2.4? See:
subnetlist="192 .168.100.0 , 192.168.101.0"
ipre=re.compile ("([0-9]{1,3}\.){3}[0-9]{1,3}")
['100.', '101.']
But:
a=ipre.finditer (subnetlist)
'192.168.100.0'
'192.168.101.0'
Traceback (most recent call last):
File "<stdin>", line 1, in ?
StopIteration
Also:
'192.168.100.0'
Is this a bug or am I doing smth wrong?
Is there a bug in re.findall in Python 2.4? See:
subnetlist="192 .168.100.0 , 192.168.101.0"
ipre=re.compile ("([0-9]{1,3}\.){3}[0-9]{1,3}")
>>ipre.findall( subnetlist)
But:
a=ipre.finditer (subnetlist)
>>a.next().grou p()
>>a.next().grou p()
>>a.next().grou p()
File "<stdin>", line 1, in ?
StopIteration
Also:
>>ipre.search(s ubnetlist).grou p()
Is this a bug or am I doing smth wrong?
Comment