From 406b0a4fbbc12056497b0048e9a019f98d9ea0d3 Mon Sep 17 00:00:00 2001 From: Suman Date: Mon, 28 Apr 2025 21:36:58 +0530 Subject: [PATCH] Changed search to findAll as this example was for regex findAll(there is another existing example of search) --- Day-02/examples/03-regex-findall.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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")