From b718541d698b93aa7a9223ee755786dbf7cfec78 Mon Sep 17 00:00:00 2001 From: Robert Date: Mon, 25 Nov 2024 12:44:15 +0100 Subject: [PATCH] task2, added case with dot --- TaskB02/task2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)