diff --git a/TaskC38/C38.py b/TaskC38/C38.py new file mode 100644 index 0000000..8b3535f --- /dev/null +++ b/TaskC38/C38.py @@ -0,0 +1,14 @@ +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("") diff --git a/TaskC38/Makefile b/TaskC38/Makefile new file mode 100644 index 0000000..e69de29 diff --git a/TaskC38/run b/TaskC38/run new file mode 100755 index 0000000..b0fae90 --- /dev/null +++ b/TaskC38/run @@ -0,0 +1,2 @@ +#!/bin/bash +python3 TaskC38/C38.py "$@" \ No newline at end of file