BF: Allow handle case when SKIPLINES lines is not matched

Example is when one or more SKIPLINES is optional in a regex
This commit is contained in:
Steven Hiscocks 2013-12-04 23:13:27 +00:00
parent c886414e2e
commit c03a50b44b

View file

@ -133,7 +133,8 @@ class Regex:
n = 0
while True:
try:
skippedLines += self._matchCache.group("skiplines%i" % n)
if self._matchCache.group("skiplines%i" % n) is not None:
skippedLines += self._matchCache.group("skiplines%i" % n)
n += 1
except IndexError:
break