diff --git a/TaskE03/run.py b/TaskE03/run.py new file mode 100644 index 0000000..14be7a5 --- /dev/null +++ b/TaskE03/run.py @@ -0,0 +1,9 @@ +import sys +import re + +for line in sys.stdin: + numbers = re.fullmatch(r"(\d{3}-\d{3}-\d{2}-\d{2})|(\d{3}-\d{2}-\d{2}-\d{3})", line.replace("\n", ""), flags=re.IGNORECASE) + if numbers: + print("yes") + else: + print("no") \ No newline at end of file diff --git a/TaskE20/run.py b/TaskE20/run.py new file mode 100644 index 0000000..8f75f31 --- /dev/null +++ b/TaskE20/run.py @@ -0,0 +1,9 @@ +import sys +import re + +for line in sys.stdin: + numbers = re.match(r'^(0?[0-9]{2}) (\d{1}-\d{3}-\d{3})$', line.replace("\n", ""), flags=re.IGNORECASE) + if numbers: + print(numbers) + else: + print("") \ No newline at end of file diff --git a/TaskE42/run.py b/TaskE42/run.py new file mode 100644 index 0000000..494856c --- /dev/null +++ b/TaskE42/run.py @@ -0,0 +1,9 @@ +import sys +import re + +for line in sys.stdin: + str = re.match(r'(NIE|NO).*[EO]{6,}.*!!!.*', line.replace("\n", ""), flags=re.IGNORECASE) + if str: + print('yes') + else: + print("no") \ No newline at end of file diff --git a/TaskE48/run.py b/TaskE48/run.py new file mode 100644 index 0000000..8bf2db7 --- /dev/null +++ b/TaskE48/run.py @@ -0,0 +1,9 @@ +import sys +import re + +for line in sys.stdin: + numbers = re.match(r'^[a-ząćęłńóśźżA-ZĄĆĘŁŃÓŚŹŻ]([a-zA-ZąćęłńóśźżĄĆĘŁŃÓŚŹŻ]*[a-zA-ZąćęłńóśźżĄĆĘŁŃÓŚŹŻ])?$', line.replace("\n", ""), flags=re.IGNORECASE) + if numbers: + print('yes') + else: + print("no") \ No newline at end of file