jezyki-formalne/TaskB03/task3.py

10 lines
255 B
Python
Raw Permalink Normal View History

2024-11-25 12:35:44 +01:00
import re
2024-11-25 12:38:21 +01:00
with open('polish_wiki_excerpt.in', encoding='utf8') as file:
2024-11-25 12:35:44 +01:00
lines = file.readlines()
pattern = r'19\d\d r\.'
for line in lines:
line = line.strip()
x = re.search(pattern, line)
if x:
print(line)