diff --git a/TaskB02/task2.py b/TaskB02/task2.py index 8d16c27..9d6edf2 100644 --- a/TaskB02/task2.py +++ b/TaskB02/task2.py @@ -2,7 +2,7 @@ import regex as re with open('polish_wiki_excerpt.in', encoding='utf8') as file: lines = file.readlines() - pattern = r'( |[Pp])ies(( \w+)|$)' + pattern = r'( |[Pp])ies(( \w+)|(\.$))' for line in lines: line = line.strip() x = re.search(pattern, line)