summaryrefslogtreecommitdiff
path: root/progs/a155.py
diff options
context:
space:
mode:
Diffstat (limited to 'progs/a155.py')
-rw-r--r--progs/a155.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/progs/a155.py b/progs/a155.py
new file mode 100644
index 0000000..d9193e0
--- /dev/null
+++ b/progs/a155.py
@@ -0,0 +1,7 @@
+import re
+def text_match_zero_one(text):
+ patterns = 'ab?'
+ if re.search(patterns, text):
+ return 'Found a match!'
+ else:
+ return('Not matched!') \ No newline at end of file