implement text.extract_iter

pull/13/head
Mike Fährmann 9 years ago
parent 332d9e393b
commit 99b4fbb081
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

@ -99,6 +99,14 @@ def extract_all(txt, rules, pos=0, values=None):
values[key] = result
return values, pos
def extract_iter(txt, begin, end, pos=0):
"""Yield all values obtained by repeated calls to text.extract"""
while True:
value, pos = extract(txt, begin, end, pos)
if value is None:
return
yield value
if platform.system() == "Windows":
clean_path = clean_path_windows
else:

Loading…
Cancel
Save