diff --git a/TaskD01/run.py b/TaskD01/run.py new file mode 100644 index 0000000..20193fa --- /dev/null +++ b/TaskD01/run.py @@ -0,0 +1,7 @@ +import re +import sys + +for line in sys.stdin: + stripped_line = line.strip() + if re.search("Hamlet", stripped_line): + print(stripped_line) diff --git a/TaskD01/simple.out b/TaskD01/simple.out new file mode 100644 index 0000000..8f93eae --- /dev/null +++ b/TaskD01/simple.out @@ -0,0 +1,2 @@ +Here comes Hamlet +Hamlet Hamlet again diff --git a/TaskD02/run.py b/TaskD02/run.py new file mode 100644 index 0000000..5ebb7af --- /dev/null +++ b/TaskD02/run.py @@ -0,0 +1,7 @@ +import re +import sys + +for line in sys.stdin: + stripped_line = line.strip() + if re.search(r"\bpies\b", stripped_line, re.IGNORECASE): + print(stripped_line) diff --git a/TaskD02/simple.out b/TaskD02/simple.out new file mode 100644 index 0000000..7b3620b --- /dev/null +++ b/TaskD02/simple.out @@ -0,0 +1,3 @@ +Pies ma Alę +Kot i pies to zwierzęta +pies diff --git a/TaskD03/run.py b/TaskD03/run.py new file mode 100644 index 0000000..5917937 --- /dev/null +++ b/TaskD03/run.py @@ -0,0 +1,7 @@ +import re +import sys + +for line in sys.stdin: + stripped_line = line.strip() + if re.search("19[0-9][0-9] r\.", stripped_line, re.IGNORECASE): + print(stripped_line) diff --git a/TaskD03/simple.out b/TaskD03/simple.out new file mode 100644 index 0000000..7134c32 --- /dev/null +++ b/TaskD03/simple.out @@ -0,0 +1,3 @@ +Kiedyś był 1934 r. +Kiedyś był 1934 r.fsdfsdfsdf +1934 r. to jakaś data diff --git a/TaskD04/run.py b/TaskD04/run.py new file mode 100644 index 0000000..b45ed5c --- /dev/null +++ b/TaskD04/run.py @@ -0,0 +1,10 @@ +import re +import sys + +for line in sys.stdin: + stripped_line = line.strip() + if re.search("\d+", stripped_line): + sub = re.findall("\d+", stripped_line) + print(' '.join(sub)) + + diff --git a/TaskD04/simple.out b/TaskD04/simple.out new file mode 100644 index 0000000..c661a47 --- /dev/null +++ b/TaskD04/simple.out @@ -0,0 +1,4 @@ +34234 34 5 +34535 +34 +1992 1999