diff --git a/TaskB02/task2.py b/TaskB02/task2.py index 9d6edf2..b435c3b 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'(P|( p))ies(( \w+)|(\.$))' for line in lines: line = line.strip() x = re.search(pattern, line)