From de49f425942ad60703d0b953c249381ce6b695e8 Mon Sep 17 00:00:00 2001 From: Daniel Date: Sun, 19 Jul 2020 16:06:10 -0500 Subject: [PATCH] resolve the challenge coding the def run function to find the encode message using regedex. --- src/main.py | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/main.py b/src/main.py index 3f1ef43..bebf73c 100644 --- a/src/main.py +++ b/src/main.py @@ -1,9 +1,19 @@ -# Resolve the problem!! - +import re def run(): - # Start coding here - + message = '' + pattern = re.compile(r'([a-z\s?])') + f = open('encoded.txt', 'r', encoding='utf-8') + for line in f: + match = re.findall(pattern, line) + if match != "": + print(message.join(match)) + else: + print('No encontro nada') + f.close() if __name__ == '__main__': run() + + +