Fix bug in extract_last_occurence (#568)

master
Christoph Schütte 2017-11-02 10:20:18 +01:00 committed by GitHub
parent c945bb360a
commit 5408cf52c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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]