diff --git a/Day-02/examples/03-regex-findall.py b/Day-02/examples/03-regex-findall.py index ec5cdd5c..76fcaa1c 100644 --- a/Day-02/examples/03-regex-findall.py +++ b/Day-02/examples/03-regex-findall.py @@ -1,10 +1,10 @@ import re -text = "The quick brown fox" +text = "The quick brown brown 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")