Fix bug in extract_last_occurence (#568)
parent
c945bb360a
commit
5408cf52c7
|
@ -40,7 +40,7 @@ class Pattern(object):
|
||||||
None if no match was found.
|
None if no match was found.
|
||||||
"""
|
"""
|
||||||
matches = self.regex.findall(text)
|
matches = self.regex.findall(text)
|
||||||
if matches:
|
if not matches:
|
||||||
return None
|
return None
|
||||||
return matches[-1]
|
return matches[-1]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue