From af2d9f25d869bc857aaf11e160f900ab1016c428 Mon Sep 17 00:00:00 2001 From: Nagabhushana Sistu <92975052+Chittiinfo@users.noreply.github.com> Date: Mon, 15 Jul 2024 21:44:41 +0530 Subject: [PATCH] Update 03-regex-findall.py Replaced re.search() code with re.findall() as this example for findall function. --- Day-02/examples/03-regex-findall.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Day-02/examples/03-regex-findall.py b/Day-02/examples/03-regex-findall.py index ec5cdd5c..f264d2fc 100644 --- a/Day-02/examples/03-regex-findall.py +++ b/Day-02/examples/03-regex-findall.py @@ -3,7 +3,7 @@ text = "The quick brown fox" pattern = r"brown" -search = re.search(pattern, text) +search = re.findall(pattern, text) if search: print("Pattern found:", search.group()) else: