summaryrefslogtreecommitdiff
path: root/progs/unparsable_programs/a68.py
diff options
context:
space:
mode:
Diffstat (limited to 'progs/unparsable_programs/a68.py')
-rw-r--r--progs/unparsable_programs/a68.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/progs/unparsable_programs/a68.py b/progs/unparsable_programs/a68.py
new file mode 100644
index 0000000..f0c967a
--- /dev/null
+++ b/progs/unparsable_programs/a68.py
@@ -0,0 +1,10 @@
+import re
+regex = '''^(25[0-5]|2[0-4][0-9]|[0-1]?[0-9][0-9]?)\.(
+ 25[0-5]|2[0-4][0-9]|[0-1]?[0-9][0-9]?)\.(
+ 25[0-5]|2[0-4][0-9]|[0-1]?[0-9][0-9]?)\.(
+ 25[0-5]|2[0-4][0-9]|[0-1]?[0-9][0-9]?)$'''
+def check_IP(Ip):
+ if(re.search(regex, Ip)):
+ return ("Valid IP address")
+ else:
+ return ("Invalid IP address") \ No newline at end of file