Skip to content

Commit 406b0a4

Browse files
committed
Changed search to findAll as this example was for regex findAll(there is another existing example of search)
1 parent 14518ae commit 406b0a4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Day-02/examples/03-regex-findall.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
text = "The quick brown fox"
44
pattern = r"brown"
55

6-
search = re.search(pattern, text)
7-
if search:
8-
print("Pattern found:", search.group())
6+
findAll = re.findall(pattern, text)
7+
if findAll:
8+
print("Pattern found:", findAll)
99
else:
1010
print("Pattern not found")

0 commit comments

Comments
 (0)