15 lines
377 B
Python
15 lines
377 B
Python
import re
|
|
import sys
|
|
|
|
|
|
def line_contains(line):
|
|
if re.match("(^(al\.|os\.) ([A-Z].*) ([1-9](\d+)?)((\/\d+)|( m. [1-9])))|(^(ul\.) ([A-Z].*) ([1-9](\d+)?))", line):
|
|
return re.findall("^(al\.|os\.|ul\.) ([A-Z][.\S]*) ([1-9](\d+)?)", line)[0][2]
|
|
|
|
|
|
for line in sys.stdin:
|
|
if line_contains(line):
|
|
print(line_contains(line))
|
|
else:
|
|
print("<NONE>")
|