From ab38319efedee8f15c890c7370390a3fa9d9a646 Mon Sep 17 00:00:00 2001 From: Naman Tiwari <31323328+namantw@users.noreply.github.com> Date: Mon, 15 Jan 2018 02:00:54 +0530 Subject: [PATCH] Solution to Task 2 (#28) --- Solutions/namantw/Task 2/regex.py | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 Solutions/namantw/Task 2/regex.py diff --git a/Solutions/namantw/Task 2/regex.py b/Solutions/namantw/Task 2/regex.py new file mode 100644 index 0000000..d09c5fc --- /dev/null +++ b/Solutions/namantw/Task 2/regex.py @@ -0,0 +1,5 @@ +#python 2.7 +import re + +date = raw_input() +print "" + re.sub(r'(\d{1,2})-(\d{1,2})-(\d{4})', '\\2/\\1/\\3', date) \ No newline at end of file