findall just returns the captured groups:

>>> re.findall('abc(de)fg(123)', 'abcdefg123 and again abcdefg123')
[('de', '123'), ('de', '123')]

Relevant doc excerpt:

Return all non-overlapping matches of pattern in string, as a list of strings. The string is scanned left-to-right, and matches are returned in the order found. If one or more groups are present in the pattern, return a list of groups; this will be a list of tuples if the pattern has more than one group. Empty matches are included in the result unless they touch the beginning of another match.

Answer from Eli Bendersky on Stack Overflow
🌐
Google
developers.google.com › google for education › python › python regular expressions
Python Regular Expressions | Python Education | Google for Developers
If the pattern includes 2 or more parentheses groups, then instead of returning a list of strings, findall() returns a list of *tuples*. Each tuple represents one match of the pattern, and inside the tuple is the group(1), group(2) .. data. So if 2 parentheses groups are added to the email pattern, then findall() returns a list of tuples, each length 2 containing the username and host, e.g.
🌐
Blogger
how2itsec.blogspot.com › 2020 › 10 › python-regex-findall-groups.html
how2itsec: Python regex findall groups
>>> re.findall('ab(cde)fg(0123)', 'abcdefg0123 and again abcdefg0123') [('cde', '0123'), ('cde', '0123')] ... Return all non-overlapping matches of pattern in string, as a list of strings. The string is scanned left-to-right, and matches are returned in the order found.
🌐
Python documentation
docs.python.org › 3 › library › re.html
re — Regular expression operations — Python 3.14.3 ...
The regex matching flags. This is a combination of the flags given to compile(), any (?...) inline flags in the pattern, and implicit flags such as UNICODE if the pattern is a Unicode string. ... The number of capturing groups in the pattern.
🌐
LearnByExample
learnbyexample.github.io › py_regular_expressions › working-with-matched-portions.html
Working with matched portions - Understanding Python re(gex)?
To get all the matches instead of just the first match, you can use re.findall() (which gives a list of strings as output) and re.finditer() (which gives an iterator of re.Match objects).
Find elsewhere
🌐
Python Tutorial
pythontutorial.net › home › python regex › python regex findall()
Python Regex findall() Function By Practical Examples
December 10, 2021 - If the pattern has one capturing group, the findall() function returns a list of strings that match the group. If the pattern has multiple capturing groups, the findall() function returns the tuples of strings that match the groups.
🌐
PYnative
pynative.com › home › python › regex › python regex capturing groups
Python Regex Capturing Groups – PYnative
April 12, 2021 - If you try to apply it to the findall method, you will get AttributeError: ‘list’ object has no attribute ‘groups.’ · So always use finditer if you wanted to capture all matches to the group. ... import re target_string = "The price of ice-creams PINEAPPLE 20 MANGO 30 CHOCOLATE 40" # two groups enclosed in separate ( and ) bracket # group 1: find all uppercase letter # group 2: find all numbers # you can compile a pattern or directly pass to the finditer() method pattern = re.compile(r"(\b[A-Z]+\b).(\b\d+\b)") # find all matches to groups for match in pattern.finditer(target_string): # extract words print(match.group(1)) # extract numbers print(match.group(2))Code language: Python (python) Run
🌐
Python documentation
docs.python.org › 3 › howto › regex.html
Regular Expression HOWTO — Python 3.14.3 documentation
Author, A.M. Kuchling ,. Abstract: This document is an introductory tutorial to using regular expressions in Python with the re module. It provides a gentler introduction than th...
🌐
Finxter
blog.finxter.com › home › learn python blog › python re groups
Python Re Groups - Be on the Right Side of Change
May 5, 2023 - Each group flag has its own meaning: For example, if you want to switch off the differentiation of capitalization, you’ll use the i flag as follows: >>> re.findall('(?i:PYTHON)', 'python is great') ['python'] You can also switch off the capitalization for the whole regex with the “global ...
🌐
GeeksforGeeks
geeksforgeeks.org › python › python-regex-re-search-vs-re-findall
Python Regex: re.search() VS re.findall() - GeeksforGeeks
July 12, 2025 - If the pattern has capturing groups, it returns a list of tuples. ... import re s = "My favorite fruits are apple, banana, and mango." res = re.findall(r'\b\w*a\b', s) print(res)
🌐
Python for Network Engineers
pyneng.readthedocs.io › en › latest › book › 15_module_re › findall.html
Findall function - Python for network engineers
findall searches for a match of the entire string but returns a result similar to group method in Match object. If there are several groups, findall will return the list of tuples:
🌐
RegexOne
regexone.com › references › python
RegexOne - Learn Regular Expressions - Python
import re # Lets create a pattern and extract some information with it regex = re.compile(r"(\w+) World") result = regex.search("Hello World is the easiest") if result: # This will print: # 0 11 # for the start and end of the match print(result.start(), result.end()) # This will print: # Hello # Bonjour # for each of the captured groups that matched for result in regex.findall("Hello World, Bonjour World"): print(result) # This will substitute "World" with "Earth" and print: # Hello Earth print(regex.sub(r"\1 Earth", "Hello World")) For more information about using regular expressions in Python, please visit the following links: Python Documentation for Regular Expressions ·
🌐
Medium
medium.com › @yeukhon › non-capturing-group-in-pythons-regular-expression-75c4a828a9eb
Non-capturing group in Python’s regular expression | by Facing Security | Medium
August 29, 2014 - Why? It turns out that when re.findall sees a group in a regular expression pattern, the findall method will return the matches for the group.