diff --git a/Day-02/examples/03-regex-findall.py b/Day-02/examples/03-regex-findall.py index ec5cdd5c..a04906cb 100644 --- a/Day-02/examples/03-regex-findall.py +++ b/Day-02/examples/03-regex-findall.py @@ -3,8 +3,8 @@ text = "The quick brown fox" pattern = r"brown" -search = re.search(pattern, text) -if search: - print("Pattern found:", search.group()) +findAll = re.findall(pattern, text) +if findAll: + print("Pattern found:", findAll) else: print("Pattern not found")