jezyki-formalne-i-zlozonosc.../TaskC38_TODO/solution.py

10 lines
262 B
Python
Raw Normal View History

2025-01-06 17:20:56 +01:00
import re
import sys
for line in sys.stdin:
match = re.match(r'^(ul\.|os\.|al\.)\s[A-ZĄĘÓĆŁŃŚŹŻ][a-ząęóćłńśźż]+\s([1-9]\d*)(\/[1-9]\d*|\sm\.\s[1-9]\d*)?$', line)
if match:
print(match.group(2))
else:
print("<NONE>")