Re.findall()
re.findall() is a Python regular-expression function that returns all non-overlapping matches of a pattern in a string.
Regular Expression Puzzles and AI Coding Assistants
re.findall is a Python regular-expression function that returns all non-overlapping matches, including captured groups when the pattern contains them.
- How it is used
- Uses it to collect word, card-rank, or suit matches while assessing regex and AI suggestions.
- How deep it goes
- Explains captured-group output through repeated-rank traces, but stops short of a broad API reference.
- Examples
- Tests x-to-y words, repeated poker ranks, and suit extraction from flush hands.
- What you can do after
- Evaluate/understand it: judge whether a regex extracts the intended values and whether its tests support the claim.
Read how Regular Expression Puzzles and AI Coding Assistants explains re.findall() →
Tiny Python Projects: Learn coding and testing with puzzles and games
re.findall() is a Python regular-expression function that returns all non-overlapping matches of a pattern in a string.
- How it is used
- Finds every placeholder in Mad Libs input so the program can request replacement values.
- How deep it goes
- Explains list and tuple results, capture-group ordering, and tuple unpacking, but defers broader regular-expression implementation details.
- Examples
- Demonstrates extracting adjective, noun, and preposition placeholders from a fox-themed Mad Libs sentence.
- What you can do after
- Apply it via Python's re module to extract repeated pattern matches and process captured values.
Also covered in
Related concepts
- regular expressionuses · A regular expression is a formal pattern notation that describes sets of strings and specifies how text can be matched, searched, or transformed.
- tupleproduces · A tuple is a finite, ordered collection of values grouped as a single composite value, often with elements of different types.
- splitalternative to · Split is an operation or function that divides a string or sequence into parts according to a separator, pattern, or other rule.
- regex groupinguses · A regex capturing group is a parenthesized regular-expression subpattern whose matched text is retained for separate access or reference.
- functionused by · A function is a callable unit of program code that performs a computation or operation, can accept inputs, and may produce a result or side effect.
Questions about re.findall()
What is re.findall()?
re.findall() is a Python regular-expression function that returns all non-overlapping matches of a pattern in a string.
Which Manning books explain re.findall()?
Regular Expression Puzzles and AI Coding Assistants and Tiny Python Projects: Learn coding and testing with puzzles and games.
What is the difference between re.findall() and finditer?
re.findall() is a Python regular-expression function that returns all non-overlapping matches of a pattern in a string. finditer is a Python regular-expression function that returns an iterator yielding match objects for each non-overlapping match.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

